##### 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

''' Adds an additional directory to the search path '''
        directory = os.path.realpath(directory)
        if directory is not None:
            if with_subdir:
                directory = os.path.join(directory, self.subdir)
            if directory not in self._extra_dirs:
                
                self._extra_dirs.append(directory)
                self._clear_caches()
                display.debug('Added %s to loader search path' % (directory))
    def _find_fq_plugin(self, fq_name, extension):
        fq_name = to_native(fq_name)
        
        if not fq_name.startswith('ansible_collections.'):
            fq_name = 'ansible_collections.' + fq_name
        splitname = fq_name.rsplit('.', 1)
        if len(splitname) != 2:
            raise ValueError('{0} is not a valid namespace-qualified plugin name'.format(to_native(fq_name)))
        package = splitname[0]
        resource = splitname[1]
        append_plugin_type = self.subdir.replace('_plugins', '')
        if append_plugin_type == 'library':
            append_plugin_type = 'modules'
        package += '.plugins.{0}'.format(append_plugin_type)