Fix Visual Studio poor std::this_thread::get_id() performance by using GetCurrentThreadId() (and pthread_self() under linux)