Return the set of DeltaChannel names that should snapshot now.
A channel snapshots when EITHER its accumulated update count reaches
snapshotFrequency OR the total supersteps since its last snapshot reaches
DELTA_MAX_SUPERSTEPS_SINCE_SNAPSHOT. Given channelVersions, a channel
without a version is skipped: it was never written on this branch, so it
has nothing to snapshot. Pass undefined on a branch without
DELTA_WRITES_VERSIONED, where such a channel can still hold writes
and this snapshot is what bounds its walk. Pure predicate, no mutation.
deltaChannelsToSnapshot(
channels: Record<string, BaseChannel>,
countersSinceDeltaSnapshot: Record<string, [number, number]>,
channelVersions: Record<string, string | number> | undefined
): Set<string>