Memory leak fix in ZMQ layer. Decoupled connect from sending messages