Correctly handle client disconnection

Generate a "heartbeat" using zmq.poll's timeout to send a comment to
clients in order to know if they are still connected. If they are not,
sending the comment will fail and the generator will be killed with a
GeneratorExit cleaning up the worker (?)

Note: this may not work on pypy, to test, if it doesn't work
explicitly implement a closeable iterator and use *that* to kill the
worker.