set SO_KEEPALIVE on all connections

The MySQL client libraries do this automatically, so it makes sense to
do so here, as well.

This fixes #139.