Fix autoloading namespaced classes

This is a proper fix for #2556. It makes it possible to use e.g. `'class'=>'\namespace\folder\ClassName'` in a component configuration.

As far as I can tell this change has no side effects.