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

aliases = {} if aliases is None else aliases
        self.class_name = class_name
        self.base_class = required_base_class
        self.package = package
        self.subdir = subdir
        
        self.aliases = aliases
        if config and not isinstance(config, list):
            config = [config]
        elif not config:
            config = []
        self.config = config
        if class_name not in MODULE_CACHE:
            MODULE_CACHE[class_name] = {}
        if class_name not in PATH_CACHE:
            PATH_CACHE[class_name] = None
        if class_name not in PLUGIN_PATH_CACHE:
            PLUGIN_PATH_CACHE[class_name] = defaultdict(dict)
        
        self._extra_dirs = []
        
        self._module_cache = MODULE_CACHE[class_name]
        self._paths = PATH_CACHE[class_name]
        self._plugin_path_cache = PLUGIN_PATH_CACHE[class_name]
        self._searched_paths = set()
    def _clear_caches(self):