ZMQ 4.0 API

Changed monitor api to be ZMQ 4.0 compliant. The change breaks backward compatibility.
No new API has been introduced.