Fixed a number of issues with threadpool shutting down. Add a test for attempting to submit with 0 or less threads