Made ThreadManager both an Executor and an AutoClosable