Client: prevent emitting multiple keepalive errors
Client: add extra guard to starting keepalive
lib: add keepalive server-side and match OpenSSH behavior more

OpenSSH resets keepalive data for *every* reply to a global and
channel request.