Split out clean_query_string function

Instead of building it into autocomplete queries, add it as a util
function in the search module.
Use site (not API) URL when returning search results

Someday we'll use content negotiation, but not yet.