Since all calls occur on the event thread (for the C module), it makes more sense to do the check as part of the call itself inside the event thread, rather than queue it up as a separate call. explicit calls to 'state' will still get priority through the loop.
as everything else is guaranteed FIFO (in zookeeper), make sure state checks are performed in order
Instead of touching the zookeeper handle directly, let the event thread handle this via the continuation and event loop stuff
Don't use a self-pipe for the event queue, we're not blocking