##### 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 sys.modules.get(fullname):
            return sys.modules[fullname]
        
        
        
        
        
        parent_pkg_name = '.'.join(fullname.split('.')[:-1])
        parent_pkg = sys.modules.get(parent_pkg_name)
        if parent_pkg_name and not parent_pkg:
            raise ImportError('parent package {0} not found'.format(parent_pkg_name))
        
        
        
        sub_collection = fullname.count('.') > 1
        synpkg_def = _SYNTHETIC_PACKAGES.get(fullname)
        synpkg_remainder = ''
        if not synpkg_def:
            synpkg_def = _SYNTHETIC_PACKAGES.get(parent_pkg_name)
            synpkg_remainder = '.' + fullname.rpartition('.')[2]
        
        if synpkg_def:
            pkg_type = synpkg_def.get('type')
            if not pkg_type:
                raise KeyError('invalid synthetic package type (no package "type" specified)')
            if pkg_type == 'map':
                map_package = synpkg_def.get('map')
                if not map_package:
                    raise KeyError('invalid synthetic map package definition (no target "map" defined)')