WIP patch to display the organisation facets in search results
Adding json endpoint for unified search

This sets up the endpoint used for updating the
unified search results page via filters.
Add Org filtering to unified search

Org filtering on Unified search needs pushState.
When available, it works via AJAX and if not,
falls back to working like a regular form.
Adding test for checkbox filter

Some of the tests currently don't pass, but they may not be needed.
Convert tests to jasmine 1.3 api.

They were written against the 2.0 api, but frontend has 1.3 so several
tests were failing.
Update filter JavaScript to be testable

- Merge the facet form and the input box so that all the fields didn't
  need repeating on the page
- Move from a couple of closured (hidden) functions for the live search
  to an open liveSearch object which could then be tested
- Added tests for the liveSearch JavaScript
- Included a helper method to check for history support
- Moved content for tags to the top of the view so they are all together
- Used a cache for ajax calls so we don't need to reload data on
  filtering
Restore checkboxes on back button

- Update cache to use serializeArray. This can then be used to itterate
  over when restoring checkboxes rather than parsing a querystring.
- Add restore checkboxes method and use it when poping the cache
- Move pushState to checkbox change so we don't push the state when we
  pop the state.
Trigger change event when changing values
Show update button for non-history people

For people without the history api they need the submit button to be
displayed.
Bring unified columns closer together

There was 60px of padding between the results and the filters. This
moves the elements around so that there is only 30px of padding between
them as per the standard GOV.UK grid.
Correctly pluralize result
Fix typo of organisation
Only show organisation filter box if options
Track page views when updating the content
Should track page view and result counts

Use promises to track page views after new results have been displayed.
Ignore pop-state without states

If the state is null or undefined ignore the popState event. This was
being called in older versions of webkit.
Merge pull request #565 from alphagov/edd-organisation-filtering

Organisation filtering on unified search