Fix deadlock in ThreadPool::Stop