Switched to C++ 11 threading

Moved from using Windows API threading to std::thread for C++ 11