Fix keepalive

There was a regression in the TCP change, I forgot to set the last TCP send time, which spammed KEEPALIVE in a really tight loop.

I've also throttled KEEPALIVE from the client, and made the server send a message to clients to detect the last client disconnecting.