Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED. This prevents an
aborted send due to a SIGWINCH, for instance.
Change tls_socket_read() to follow the same flow. Don't bother
checking gnutls_error_is_fatal() because return codes besides AGAIN
and INTERRUPTED end up closing the connection regardless. (We don't
handle handshakes and negotations during send/receive).