Fixed race conditions

Fixed race conditions introduced by the file access locks in
FileProjectDataStore.
- History.addEntry and FileProjectDataStore.save locked the file access
lock and the project history object in opposite order. Solved by locking
on project first in FileProjectDataStore.save.
- HistoryEntryManager caused unneccesary lock on ProjectManager with
other locks held. Removed this class since all file access goes directly
through the project.
Merge remote-tracking branch 'origin/Project-file-access-thread-safety' into dev-branch