C++11 synchronization primitives

This continues whittling away at #412 by extracting the hsEvent, hsMutex and hsSemaphore rewrite stuff.  The critical section (CCritSect) stuff is not included here since it was already adjusted to work against the NetCore rewrite.