Made unittest::run_in_thread_pool use std::function.