Switch from using pthread to std::thread.
Use std::future instead of std::thread, and avoid using actions for HPX.