Fixed missing thread-safety of cgt::TextureUnit and cgt::ResourceManager.
Both classes now have a mutex protecting its shared fields. One global mutex may not be the most efficient implementation but at least is reliable and easy to follow. closes #598
Showing with 32 additions and 3 deletions