C++11 threading, Part 2

This is the "full" version of #399.  It could be merged separately for easier review, but it could also be merged instead of #399.  Due to the fact that STL doesn't have any support for inter-process synchronization primitives, there are a few Win32 threading leftovers in Win32-specific code, and hsGlobalSemaphore replaces hsSemaphore for named semaphores.  However, everything else has been ported to ```std::thread``` (or ```hsThread```) and friends.