Implement syncprims.h directly in terms of C++11 primitives except for
SharedMutex.