Support for boost::thread and use of boost::async instead of std::async

Main author: Marcel Luethi <marcel.luethi@unibas.ch>