Consistently report conflict resolution This commit refactors how conflict resolution selection reasons are handled, in order to:
- collect the list of versions which participated in conflict resolution - report a single conflict resolution cause when conflicts are resolved several times for the same module - consistently report module replacement rules as rules, not conflict resolution. Before this change, a module replacement was reported as both a conflict and a rule
Avoid sorting versions when serializing results We can avoid sorting versions by making sure we use an order-preserving multimap. Sorting is quite expensive, especially because it's done during serialization of the result.