Move normalise_query_string into wagtailsearch utils and use it in the backends

This fixes a bug which causes all search views to crash when the user searches for a bunch of spaces.