Provide a nicer UX while searching.

For user and group searches:

- if there's only one result
- and it's an exact match
- and the user can view it
- and the request is not made via the JSON API

...then we can redirect right to the match.