Exclude some spam paths found in UKTI logs
Ignore hits from TNA sending users back to a site
Speed up Whitehall mappings import

Until now, we have been loading the host for each old URL in the CSV from the
database each time. This manually caches the hosts.

In development this changed the runtime for:
➜  transition git:(master) ✗ time FILENAME=tmp/1396018394-whitehall_mappings.csv be rake import:whitehall:mappings

from:
FILENAME=tmp/1396018394-whitehall_mappings.csv bundle exec rake   181.65s user 112.01s system 88% cpu 5:31.37 total

to:
FILENAME=tmp/1396018394-whitehall_mappings.csv bundle exec rake   95.10s user 54.83s system 86% cpu 2:53.45 total
Fix error in modal when no mappings affected

The previous fix: b33cd31 triggered an error if the changes you had made
affected zero mappings, whether you were on a site-specific page or not.
Merge pull request #235 from alphagov/fix_error_displaying_modal_on_non_site_page_mk2

Fix error in modal when no mappings affected
Remove gemfury gem source

Now that we're using a version of optic14n that is available on rubygems.org,
we don't need to get it from gemfury. This should speed up bundling times.
Add some more spam patterns

Discovered these in the monitor hits.
Exclude UKTI (possibly Wordpress) image paths
Merge pull request #230 from alphagov/add_some_more_spam_paths

Add some more spam patterns
Merge pull request #237 from alphagov/remove_now_redundant_gem_source

Remove gemfury gem source
Merge pull request #234 from alphagov/speed_up_whitehall_import

Speed up Whitehall mappings import by 50%
Merge pull request #232 from alphagov/exclude_some_uninteresting_ukti_patterns

Exclude some uninteresting UKTI patterns
Merge pull request #233 from alphagov/ignore_hits_from_tna

Ignore hits from TNA sending users back to a site
Retrieve organisation_slugs from site YAML
One site can be owned by multiple organisations on import

- We only create this relationship for the extra organisation slugs,
  not the ones that were there originally, i.e. whitehall_slug.
- Fix some whitespace between {} in a block.
Ensure that site-org relationships always reflect organisation slugs

- When an organisation decides that it doesn't want a
  sub-organisation editing mappings anymore, we can remove the
  sub-organisation's slug from organisation_slugs in the YAML and the
  import will remove the relationship. That way, we don't have to
  manually delete the rows from the database.
Improve test coverage

- When multiple organisations are added, then one is deleted from a
  site, the relationship for the other still exists.
Add a can_edit_site? method to the User model

- Replicate the existing permissions on can_edit?, referring to a
  site rather than an organisation.
- Add very similar tests for this new method, referring to site
  permissions.
Add a nested context block to shorten context descriptions
Change can_edit? in MappingsController to use can_edit_site?

- Fix a failing Cucumber spec because we updated the message to no
  longer read "edit mappings for site" as we refer to site, not
  organisation.