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

if full_name not in self._plugin_path_cache[extension]:
                    self._plugin_path_cache[extension][full_name] = full_path
            self._searched_paths.add(path)
            try:
                return pull_cache[name]
            except KeyError:
                
                pass
        
        if not name.startswith('_'):
            alias_name = '_' + name
            
            if alias_name in pull_cache:
                if not ignore_deprecated and not os.path.islink(pull_cache[alias_name]):
                    
                    display.deprecated('%s is kept for backwards compatibility but usage is discouraged. '  
                                       'The module documentation details page may explain more about this rationale.' % name.lstrip('_'))
                return pull_cache[alias_name]
        return None
    def has_plugin(self, name, collection_list=None):
        ''' Checks if a plugin named name exists '''
        try:
            return self.find_plugin(name, collection_list=collection_list) is not None
        except Exception as ex:
            if isinstance(ex, AnsibleError):
                raise
            
            display.debug('has_plugin error: {0}'.format(to_text(ex)))
    __contains__ = has_plugin
    def _load_module_source(self, name, path):