Merge branch '104-148-164-tuneup-custom-search' into hampshire
Use the applications/_stats partial for the authority view
Rename percentage_current to percentage_pending
Move the _stats partial to the shared folder
Pull the authority sidebar view code into a partial
Make the search sidebar structure more like the authority sidebar
Use correct class for the refused stats visualisation
Sort authority applications most recently received first
Merge branch 'issues/145-use-sidebar-partial-for-authority-page' into hampshire
Prevent the Hampshire theme being loaded by rake spec
Remove Hampshire-specific tests from the core app specs
Fix specs to reflect changes made to the core app

Data structure changes, MySQL vs PostgreSQL sorting, etc
Fix hampshire theme specs
Better method of loading the theme-specific modifications for the theme specs only
Reinstate the applications count in the search sidebar
Repurpose the hampshire_theme feature spec for testing the search frontend
The stats should not be displayed if there are no results
More theme spec fixes, checking for > 1000 search results
Separate out the homepage and search features