Switch our threading over to pthreads to fix misbehaving threads. Civ6 needs this. Also various other bugs occur because of std::thread and pthread desync. We can think about the idea of switching to raw clone later.