Refactored more difficult thread pool tests.