Fixed problems with render reset confirmation

Fixed bug causing the render reset confirmation dialog to appear directly after
loading a scene.

Attempted to improve the synchronization of the refresh flag. This should
be refactored further in the future.
Fixed lock ordering deadlock

The deadlock was triggered by a race condition which could occur for
some scenes.

Thread A:

1. `Scene.loadScene()` locks Scene
2. `Camera.updateTransform()` locks Camera object of Scene

Thread B:

1. `Scene.set(Scene)` is called to copy scene parameters
2. `Camera.updateTransform()` locks Camera object of Scene
3. `Scene.refresh()` locks Scene

If thread B is allowed to lock the camera after thread A has already locked
the scene we get a deadlock. The fix is to make `Scene.set(Scene)`
synchronized.

fixes #277 (github)