Move autoloader to it's own class

Also adds support for loading legacy classes from `lib/legacy`, whenever a class is loaded using underscores instead of namespaces (i.e. `OC_Filesystem`) the autoloader will first look into `lib/legacy` before looking into `lib`. This allows us to move the legacy classes to their own folder and cleanup `lib` a bit.

cc @karlitschek @DeepDiver1975 @bartv2 @Raydiation