Zmq: refactored workers

This should be more reliable: error handling is done once, and all workers benefit from it.
Maybe some stuff should be moved around, but that's a first step.