Make keepalive configurable

This doesn't include realtime updates to the current connection,
although that would be possible.