Implement socket monitoring API

This pull request adds the ability to monitor socket events in a typesafe way.
ZMQ hides all socket events like connect, disconnects, etc. This patch allows users to receive these state changes on ZMQ sockets.