Allow to correct upgrade repos (bnc#889791)

Old style client. Writing proper tests would mean quite a big refactoring (believe me, I started doing it), which looks like a too big change for maintenance (most likely to be distributed as DUD for SLE12). I agreed with @kobliha that in order to merge it should be manually tested by me (already done) and another person.

So I'm not only looking for code review but also for manual testing.
I'm not sure if the fallback to `""` is needed as `"id"` is a repository alias which *has to be present* and must be unique.

Either remove the the `""` fallback or use something unique (or at least something which can conflict unlikely, e.g. `repo["url"]`). If there are two repositories which names fallback to `""` then  `equivalent_repo_for` method might return wrong repository...