Handle ZooKeeper connection loss

This should prevent the consumer from bailing out if zookeeper is unavailable when an offset is written.

Not 100% sure there won't be any consequences from not writing the offset, so this could do with some more testing. Also, hopefully, this code will be obsolete anyway when we switch to Kazoo.