[CORE] Add ThreadPool.terminate to streamline shutdown

Shutting down threadpools and executor services is done in very similar
fashion across the codebase. This commit streamlines the process by
adding a terminate method to ThreadPool.

This PR also re-enables the threadleak filtering including a 5 second linger period since threadpools don't join their threads.