Ref T8510. We had two issues with mixed-case result sorting, like typing @joe to match user Joe.
- The fallback sort was not normalized properly, so "J" could sort after "j". Instead, normalize values for sorting.
- The prefix_hits and older priority_hits mechanisms were competing destructively. The prefix_hits mechanism completely replaces the priority_hits mechanism. Instead, use only the prefix_hits mechanism.