Add a test for accessing classes from another thread. Fix UnregisterClass behaviour with NULL hInstance.