Fix the thread pool

This PR is work in progress to fix the ThreadPool in billiard.Pool.