put some common functionality into capnp_zmq.rs