Refactoring poller to like zloop from the czmq.

the code is much simpler now.