Follow-up to #1836008: Remove drupal_classloader() use in Drupal\Core\AnnotatedClassDiscovery
Quick Idea: Add a new interface that just defines a single method, getNamespaces() or something like that. Then we can either let the module_handler implement that or have class that contains the handler and includes component/theme/custom directories separately.
Having it in a separate interface would also make it easy to use for static lists and tests.