Fix event handling.

0MQ returns events as bitmasked integrals. The old approach of using
equality comparison to figure out which event has occurred would not
work when events have been OR'ed together. This fix will utilise lists
of events to denote the possibility of multiple events, i.e. the
functions "events" now returns [Event] and "poll" uses [Event] as
interest sets.

Additionally we now accept an optional handler function for each Poll
instance which will be invoked iff events occured for which an interest
was expressed. The handlers will be called sequentially, so they should
not block and also not cause exceptions.