Supporting graceful signal shutdown.

Adding a signal handler and gracefully shutting down all threads.
These are logs so I think they're okay. Errors were the lowercase ones IIRC.