Implemented reconnection in TcpClient

TcpClient::SendMessage() disconnects if there was an error sending
or receiving through a socket. On subsequent calls it tries to
connect again. There is no attempt to reconnect to send the message
that failed the first time, a socket is simply closed, and an error
is reported. Next time, though, a new connection will be made that
may succeed. It is the responsibility of the library user to try
again if it wishes.