Add hit_count to Mapping

* For precomputation to assist Sort By Hits
Micro-optimise Site#hit_total_count

* Get it in one hit, don't iterate rows
Make spec language consistent

* We only use "should" in assertions
Refactor Import::HitsMappingsRelations

* Instance it so we're not passing around site
* Remove some duplication around IN clauses
Precompute mapping hit counts

* Part of Import::HitsMappingsRelations.refresh!
* Not too onerous a query
Remove Mapping#with_hit_count

* expensive scope
* hit_count now precomputed and available as an attribute on Mapping
Only show the percentage of unresolved mappings when some exist

- Use an instance variable defined in the controller instead of data
  access in the views - pointed out by @jamiecobbett.
- Indent inside the `if` statement.
Refactor a tiny bit of data access in views to the controller

- Spotted by @jamiecobbett in https://github.com/alphagov/transition/pull/329.
Merge pull request #329 from alphagov/only_show_percentage_when_unresolved_mappings_exist

Only show the percentage of unresolved mappings when some exist
Merge pull request #330 from alphagov/refactor_site_tags_data_access_out_of_view

Refactor a tiny bit of data access in views to the controller
Change copy for Overwrite/Ignore existing mappings

Overwrite existing mappings => Keep existing mappings
Fix type_invalid message to include unresolved
Actually memoize MappingsBatch#canonical_paths

In development, on a batch of 13,000 paths, this took the time to show the
Bulk Add preview from 7-8s to 4-5.5s.
Make validation messages on New URL consistent

The form labels this field as 'Redirects to', but the validation messages were
referring to it as 'New URL'. 'Redirects to is not a URL' reads a little
awkwardly, so let's make it consistent with existing validation messages on
bulk add.
Merge pull request #331 from alphagov/make_validation_messages_on_new_url_more_consistent

Make validation messages on New URL consistent
Fix a spec to use an invalid URL

This looks as if it was left over from the switch to use Addressable
everywhere - Addressable can parse '___' but it wasn't in the whitelist,
so validation was failing but not for the reason indicated in the test
description. This one really is unparseable by Addressable.
Add filtering to the whitelist view

- This behaves more like the organisation view.
Add a Cucumber spec to test that only admins can access the whitelist
Highlight the row containing the domain just added to the whitelist
Merge pull request #318 from alphagov/whitelist_view_improvements

Improve the whitelist view