Fix the migration, so it deals with duplicate job uuids
This is required to solve our state of database, where depchecks have
multiple jobs with the same uuid, and in the resultsdb 2.0 the uuid is
an unique identifier of the group.
This is done by merging the results of each "duplicate" job to the first
one with that specified uuid, and deleting the other (now result-less)
jobs.
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1054