[Critical] Fixes algorithm for retaining backups

Prior to this commit, `keepBups` would keep the earliest n backups from
any given interval instead of the latest. This lead to a situation where
newly created backups would always get discarded, effectively ruining
the whole backup mechanism.

In addition, the enumeration algorithm had a similar problem whereby
the earliest backup from any given interval would become `interval.0`,
and not the latest. This has also been fixed.