Added monitor method to socket.

This method uses zmq_socket_monitor to create a PAIR socket on the given socket. On this PAIR socket the socket related events are sent.
Applications can connect a PAIR socket to receive these events.

NOTE: First go. zmq_events_t is not available.

this test is failing on kfreebsd
do I understand it correct that it is assuming that a connect is always delayed on its first try? so the failure on freebsd might just be because it is faster in connecting the socket?