resultsmodel: sort by category relevance first only when not the same
When comparing categories for sorting, go by less-than for category relevance only when the category relevance actually differs, else fall back to match relevance.
Test plan:
- Create a plain text file named tomato_sauce.txt
- Create a spreadsheet named tomato.ods
- Search for "tomato"
Before: Text file is shown first, because plain text files are always shown before spreadsheets, which is not useful
After: Spreadsheet is shown first, as expected, because it is an exact match, and so its category is more relevant