Revise threadpool implementation to eliminate spurious wake-up issues and get_thr_arg NULL warnings.  Make code cleaner between dynamic/pool options.

Thanks to Jacob Anderson <jwa@beyond-ordinary.com> for pthread suggestions