rewrite
Stores snapshot, rebuilt from the log, in place of the stored one: when the store holds none for its ref, or holds the same or a lower version, whatever its state revision; returns whether it was written. A stored version above snapshot's, written meanwhile, stays. Writing clears a stale mark of a version up to snapshot's.