change all instances of NULL in '/engine/sys/' to nullptr to adhere to c++11 coding standards.

Changed SDL_Mutex to std::mutex with std::unique_lock; reduced lines of code and uses RAII so no need for SDL_UnlockMutex

Also passed some function/contructor arguments to const& where applicable so no unneeded copies of variables are made.

e.g. std::function should be passed by reference because it actually manages its own memory, not just a function pointer.
Merge branch 'master' of https://github.com/RamblingMadMan/Unvanquished