Few improvements

First I think that we need some way to exit heartbeat goroutine.
Second, client should have option to close communication.
And third, trying to detect dead socket as soon as posible. So I'm setting some sensibile read deadline.