Background loading of resources

- Adds a mechanism for background loading resources. Call ResourceCache::BackgroundLoadResource() to use. Resource loading is now split into two virtual functions: BeginLoad(), which can run in a background thread, and EndLoad(), which always runs in the main thread and for example uploads GPU data.
- Scene::LoadAsync() and LoadAsyncXML() have been expanded to support background preloading the scene's resources first, and also a mode where only the resources are loaded, but not the scene content itself. This can be used to preload resources from an object prefab to ensure fast instantiation later.
- Improvements for threading. Log messages are supported from outside main thread, using the Profiler becomes a safe no-op, while sending events & ResourceCache::GetResouce() log errors if attempted from outside the main thread.