Handle disconnects for the ctl connection

The problem is that this module should run for a long time. Mysql
disconnects long running connections and therefore getting table
information causes the whole program to crash.
Merge pull request #43 from noplay/handle_ctl_disconnects

Handle disconnects for the ctl connection