Handle redirects during prefix search exact match

Prefix search attempts to find exact matches to the user's query that aren't
returned by plugins.  In some cases, like when the exact match is a redirect
and the target of the redirect is also in the search results, it would result
in multiple results in prefix search going the same place.  This looks really
silly when the top hit is "Barack obama" (a redirect) and the next one is
"Barack Obama" (the target of the redirect).

This handles a bunch of cases to do with redirects in the matches and when
the exact match is a redirect.

Bug: 736731
Change-Id: I49fe1ccec84bd5d1f44c6b91b260abf50f2cc3a1
Merge "Handle redirects during prefix search exact match"