Refactoring of ThreadPool

Introduce AbstractThreadPool for managing threads, and a subclass
ThreadPool for handling a regular task queue.

This is to prepare for a custom JIT thread pool with multiple queues.

Test: test.py
Change-Id: I180032d14b8946ea6787252bd4fe4c89409e089b
15 files changed