fix filtered search results

If the user enters the words 'county', 'city', or 'state' then we have
to filter to just those types of jurisdictions.
fix a copy-and-paste-o; searches mentioning 'state' should filter to states
Added more tests for the search function.
Merge branch '34-autocomplete-result-order' of github.com:solarpermit/solarpermit into 34-autocomplete-result-order
Fixed minor issue with tests
fix ordering for zipcode searches as well
Merge branch '34-autocomplete-result-order' into devel

Fixes #34