Generate data loss report from repository generation info
Changes dataloss subcommand to report data loss based on repository generations. This allows us to report more accurately, including how many writes a repository is behind at maximum.
The report is not 100% accurate as generations map to mutator calls and some mutator calls do not indicate unreplicated writes. These are mutators are mainly for repository housekeeping and do make any changes visible to the client. The accuracy can be improved by tagging these housekeeping mutators later as such and ignoring them when it comes to incrementing the generation of a repository.
Generations guarantee the repository was at least on the stored generation. As such, the tool might produce false positives in case a replication was successful but the database record failed to be updated. In case of a failover, some of the repositories reported as outdated may contain the latest changes.
Since generations are only recorded for repositories that have received new mutator RPCs, this won't report data loss from repositories that have failed replication prior to the generations being introduced.