Pymat zmq

WIP. The old version will be replaced by the ZMQ version step by step in this branch