more cleanups of ThreadPool code - improved (but not fully fixed) code for reducing threadpool size