Adds a simple std::mutex implementation for Windows, which doesn't include it in stdlib.
Adds usage of std::mutex to make logging thread-safe.