Threadpool 1.0

- Thread pool optimizations.
- Pending queue optimizations.