Avoid generating duplicate conflict rules

For each version of each package we create a conflict rule with each
other version of itself. These are then added to the rule set and skipped if
duplicate so instead we can just generate them only once to begin with
and avoid unnecessary memory allocation and duplication lookups.

Packagist `composer update --dry-run --profile` before:
```
Memory usage: 164.29MB (peak: 393.37MB), time: 82.9s
```

and after:
```
Memory usage: 163.99MB (peak: 318.46MB), time: 47.14s
```