outputconfigurationstore: handle imperfect matches for outputs better
There are some situations where there can be multiple matches for a given output, like
when two outputs with the same EDID ID but different EDID hashes or connector names were
connected before and now only one of them is connected.
In these situations, we'd previously just pick the first match in the list, even though
the other match is more precise; and that could end up changing the settings for that
output. Once the second output is connected again, it would then get the wrong settings.
To fix that, this commit only considers an entry in the config as a match if there is only
one match for the relevant criteria. If there's multiple, then the search is narrowed down
to take more crtieria into account, like the MST path or the connector name.
Edited by Xaver Hugl