Fixes, changes to the API

Main changes:
1) Added loadResource which can use a thread ID to load all the
resources pointed by its metadata.
2) Added on-load events for instances, since loadResource can't return
IDs.
3) saveScene now saves all the required information, including texture
overrides.
Merge branch 'master' of https://github.com/flowtsohg/mdx-m3-viewer