Shutdown the internal pool to avoid deadlocks
Merge pull request #219 from halorgium/shutdown-internal-pool

InternalPool doesn't clean up at_exit