##### SUMMARY
The collection loader currently imports a number of things from Ansible, the heaviest of which is config/constants. This makes it heavyweight and somewhat dangerous for ansible-test and unit tests to use. Refactor it to minimize those imports and supply the necessary impls another way (constructor, DI pattern, etc).

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
AnsibleCollectionLoader

##### ADDITIONAL INFORMATION

''' formats data to display debug info for plugin loading, also avoids processing unless really needed '''
        if C.DEFAULT_DEBUG:
            msg = 'Loading %s \'%s\' from %s' % (class_name, os.path.basename(name), path)
            if len(searched_paths) > 1:
                msg = '%s (searched paths: %s)' % (msg, self.format_paths(searched_paths))
            if found_in_cache or class_only:
                msg = '%s (found_in_cache=%s, class_only=%s)' % (msg, found_in_cache, class_only)
            display.debug(msg)
    def all(self, *args, **kwargs):
        '''
        Iterate through all plugins of this type
        A plugin loader is initialized with a specific type.  This function is an iterator returning
        all of the plugins of that type to the caller.
        :kwarg path_only: If this is set to True, then we return the paths to where the plugins reside
            instead of an instance of the plugin.  This conflicts with class_only and both should
            not be set.
        :kwarg class_only: If this is set to True then we return the python class which implements
            a plugin rather than an instance of the plugin.  This conflicts with path_only and both
            should not be set.
        :kwarg _dedupe: By default, we only return one plugin per plugin name.  Deduplication happens
            in the same way as the :meth:`get` and :meth:`find_plugin` methods resolve which plugin
            should take precedence.  If this is set to False, then we return all of the plugins
            found, including those with duplicate names.  In the case of duplicates, the order in
            which they are returned is the one that would take precedence first, followed by the