Better handling of zmq_poll errors. Fix ZMQ 4.0 compatibility.