Make the ircbot reconnect on failure.

Currently, it reconnects if it gets a connection and then later loses
it.  Here, this adds logic to make it try to reconnect after 60s if it
fails to get a connection on the first go.

We also add some logic so it knows how to shutdown cleanly when told to
by moksha.