Add test for multiple thread init/shutdown
Posix synchronized init, prototype win32 version
Use InterlockedCompareExchange for the lock
Don't use git_atomic as an integer