[WiP] [FIXED JENKINS-24380] Use build numbers as IDs

[JENKINS-24380](https://issues.jenkins-ci.org/browse/JENKINS-24380)

Does not yet deal with migrating historical records.