Trim whitespace from search queries (Bug 967754)

From [Bug 967754](https://bugzilla.mozilla.org/show_bug.cgi?id=967754), it was found that searching for only whitespace would cause elasticsearch to throw an error indicating that search is temporary unavailable. This pull request will simply trim any whitespace so that searching for a space will be treated the same as searching with no query.