Background loading of resources

- Adds a mechanism for background loading resources. Resource loading is split into two 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, 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.