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