only create socket monitors if using zmq 3
terminate socket monitors before closing sockets
only define clear and remove methods if using zmq 3

unbind and disconnect are not available in zmq 2.1
don't try to unbind/disconnect if not on zmq 3

Ideally you'd never deploy this way, but travis doesn't have zmq 3, so
we need to at least be able to run tests.