Refactor daemon thread pool creation.
Merge pull request #397 from JoshRosen/refactoring/daemon-threads

Refactor daemon thread creation