Minor fixes

Minor fixes related to constness in threading.h and wrapped_pool.h