Fix unstability caused by one test fixture

@ikeough @Steell 

The test case TestLoadNoNamespaceClass registers events but does not unregister events. Because the events are registered in a static instance, this is causing test cases in other test fixtures to fail. This submission fixes the issue by registering the events in the setup process and unregistering them in the teardown process.