Fixing the locking
Finsihed fixin the master persistent data
Fixing the chunkserver persistent data
Fixing merge conflicts after moving lots of functions to masterserverthread
Small edits