A CRDT document paired with the explicit frontier for one collaboration
route. This is the small, undo-free replica used by metadata documents such
as room indexes; application documents add history through State.
write_revert_patches for only the patches keep accepts: a restore
of some items of a past version, or of everything but bookkeeping. The
rest stay in the patch stream unwritten, so the indices of later
sequence patches still line up. Returns how many patches were written.