Improve TcpInput and TcpOutput handling of keep_alive_period default

interval, and update docs to include keepalive info. Closes #1054.