relpTcpDestruct() was calling close(sock) before relpTcpDestructTLS(),
causing SSL_shutdown() to write close_notify to an already-closed fd
(EBADF). Both BIO_new_socket() calls used BIO_CLOSE, causing SSL_free()
to close the fd a second time -- silently destroying any socket the OS
had reassigned to a new incoming connection in the interim.
Backport https://github.com/rsyslog/librelp/pull/292
Resolves: RHEL-191751
Signed-off-by: Cropi <alakatos@redhat.com>