Add querystring updates to search

Update and parse a "?q=" query string for search to improve cross-site
linkability.