Cleaned up snapshot version assignment code. The old code was relying on a lot of assumptions which were difficult to verify.
This *seems* to close #728 , but I'm doing more testing now.
A bit more fool-proofing and more comments in snapshotting code.
I was a bit too strict for the unit tests.
Merge branch 'next' into daniel_728
Allow ordering assumptions to be violated by write transactions.
Merge branch 'next' into daniel_728
Merge branch 'daniel_728' into next