High: cib: Reorganize things to avoid calculating the XML diff twice
We calculated it once to figure out what changed and then again once
we'd updated the version counters. Better to do it once and manually
fix the version counters in the diff.
Calculating diffs forms a significant part of the cib workload.
Mercurial revision: 6888e29d7e00dcf1c8c14457a5049670e0eaffd7