Reorganize reconnect() into AbstractClient, and fix a bug

RetryingTcpClient didn't reconnect properly.