add handling for socket timeouts

It became obvious to me today that I had overlooked the possibility of
losing connection with the irc server without crashing or being reset by
the host. Today the IRC server died quietly and bot-tooper just sat
there with it's socket blocking waiting for more messages, but the
messages never came and he never knew he needed to reconnect when the
server was back up.

Now the socket has a timeout of 2 minutes and the bot will attempt to
ping the server if a timeout occurs. If the ping results in a PONG, it's
back to business as usual for at least 2 minutes. If the ping also times
out then the process will exit and a supervisor script can spin up a new
instance to reconnect.