saveCheckpoint
Persist state and its resume cursor lastEventId as ONE atomic unit.
The state and cursor live under two DataStore keys but are written in a single edit transaction, so a process kill or a concurrent reader can never observe (or back up to the cloud) a torn pair — a state at frontier F alongside a cursor that implies a different frontier. That torn pairing is what produced the NonLinearInsertion genesis-resync loop; saving the pair atomically is the cure. Prefer this over separate saveState + saveLastAppliedEventId calls everywhere a checkpoint is written.