The new version doesn't need the curiously recurring template pattern, is
consistent about naming of GlobalMutex vs GlobalLock, has a lot more comments,
and has a much better separation of concerns than before.
In addition to being much cleaner and easier to understand, these changes are
also going to be needed later, when another set of changes gets put upstream
(pending approval by IBM management).
If this set of changes it too large for a single PR/commit, I can easily break
it down into the following 5 change sets:
- Rename GlobalLock to GlobalMutex
- Make InitByteGlobalMutex check GetThreadID instead of PlatformThreadID
- Split InitByteXXX classes
- Added GuardBase class
- Moved cxa_guard_acquire/release/abort into GuardBase