Testclass unit tests

Added unit tests for TestClassLoader by porting existing unit tests for TestCaseLoader. Hopefully, this makes it safer to apply fixes to both loaders simultaneously.

Also moved registration of TestClassLoader's specific hooks to plugin.register in the process. This makes the two loaders more similar.