Use std::atomic_int for hsSafeRefCnt, and move it to hsRefCnt.h/cpp
Replace hsMutex with std::mutex
Replace hsSleep with std::thread::sleep_for
Use C++11 threading for hsEvent, and clean up the API a bit
Convert hsThread to a std::thread implementation
Simplify plDispatch mutexes a bit
Merge remote-tracking branch 'zrax/cxx11_threading' into cxx11_threading_plus
Merge remote-tracking branch 'vincent/master' into cxx11_threading_plus
Move the old IPC-based semaphore to hsGlobalSemaphore, and provide a
"normal" (inter-thread only) semaphore class.
Add a proper binary semaphore type
Fix compile errors due to incompatible changes
Also replace hsCritSect (CCritSect) and CRITICAL_SECTION with std::mutex
Merge pnUtRef with hsRefCnt, and remove the former
pnUtRef started at zero refs instead of one, and this is simpler
than finding and removing all the extra Ref() calls.
More std::atomic and friends
Update the login dialog status message thread to std::thread
Get rid of the return value from hsThread::Run() -- it was useless anyway
Fix a few miscellaneous issues
Fix some coverity warnings
fix a g++ error