Check wether the main thread is alive before restarting the dispatcher thread.
Check wether the main thread is alive before restarting the dispatcher thread.

Fix: https://github.com/Shopify/statsd-instrument/issues/291

If the main thread is already dead, we shouldn't try to respawn the
thread. Instead we can send the datagram directly.

Shopify/statsd-instrument