Adds "ping" loop to test for connectivity to server

Adds a "ping" loop testing for connectivity to the IRC server. If a reply is not received, will attempt to reconnect.

Note that this is not thoroughly tested yet, I've only tested it with some simple connection failure cases such as when the IRC server is completely offline. Still needs to be tested for network degradation failures.