rs/zkfarmer — pull request #19 by vincentbernat (2013-01-16 14:04:25+00:00)
Title: watcher: ensure we don't erase local modifications by late ZK notifications

For each modification we do locally, we send this modification to ZK
which is noticed and comes back. If we have a local modification in
the meantime, this modification can be lost:

1. Set value locally to 1565. Notice it.
2. Value sent to ZK.
3. Set value locally to 1566. Don't notice it yet!
4. Value comes back from ZK (as a notification).
5. We compare the local value (1566) with the value from ZK (1565).
6. They are different, we update the local value.
7. We have lost the local modification.

We fix this by not acting on remote modification when their zxid is
less or equal to the one we got for the latest local
modification. This does not solve all problems, but we won't have
values that bounce back to a previous value without any exterior
interaction.