Fixed lots of threads concurrency issues when the application was shutdown while rendering.
Also while saving the project’s state is now properly locked, preventing any change made while saving it to be recorded.