Change the default number of threads for the ThreadPool class.

Fixes #6279