Add SO_KEEPALIVE support to anet.c.
Set SO_KEEPALIVE on client sockets if configured to do so.