upgradepath: fix the algorithm when pushing to older -updates repo
When pushing to older -updates repo, we have to unite -main and -updates
repos of higher Fedora releases to perform upgradepath checking
correctly.
Also this patch takes into account the rare case when someone would want
to push a build that is older the the current one in a repository.
Fixes tickets #309 and #230.