Remove the managed_by_transition column from the sites table

- This is a part of retiring redirector.
Fix tests failing due to the removal of the database column

- Within this, remove most references to managed_by_transition,
  including SQL scopes.
Remove managed_by_transition from the hosts API

- In doing this, the hosts API no longer knows about
  managed_by_transition, and no longer refers to a site of a host being
  managed by transition. We're removing two hosts features that
  reference errors in the JSON, as there will be no errors now because
  it is just a list of hosts. Jenny and I discussed making the hosts API
  error when there is no data, but that would be inconsistent with the
  rest of the app's behaviour.
Fix broken link in breadcrumb for bulk add preview

This now links to the new bulk add batch form, which is equivalent
to the breadcrumb for import mappings.
Merge pull request #414 from alphagov/fix_bulk_add_breadcrumb

Fix broken link in breadcrumb for bulk add preview
Correctly pluralize 'file' in hits import message

In the hourly import of transition-stats hits, usually only one file
has changed and the resulting incorrect pluralization annoys me.
Merge pull request #415 from alphagov/pluralize_hits_file_message

Correctly pluralize 'file' in hits import message
Don't import the data/sites directory from redirector anymore
Merge pull request #413 from alphagov/remove_managed_by_transition

Remove references to `managed_by_transition`
Enable request forgery protection for features

Bulk edit without js has been broken for a few months due to a missing
authenticity_token, and we didn't notice. This change will mean that
features should fail if we do this again.
Remove trailing whitespace from 2 lines.
Include authenticity_token for non-js bulk edit

Since Rails 4.0, remote forms have not included authenticity_token
by default:

    https://github.com/rails/rails/commit/128cfbdf4d316a544a76e5c58dbeac153f3d4e36

The form_tag needs to have `remote: true` to work in the modal, but
also needs the authenticity token to work without JavaScript. This
commit includes the token in the form via the helper's options and
fixes the features which were failing on the missing token. We
don't use remote forms anywhere else in the app.
Merge pull request #416 from alphagov/fix_bulk_edit_without_js

Fix bulk edit without JavaScript
Disallow adding a mapping that redirects to a TNA URL

- We came across some redirects to TNA, instead of archives. This stops
  users from adding any URL beginning with
  http://webarchive.nationalarchives.gov.uk/ as a redirect.
Disallow editing a mapping to redirect to a TNA URL
Make the not-TNA validator check a parsed URL's host, not just a string

- This makes it consistent with how NationalArchivesURLValidator checks
  for a TNA host.
Remove new URLs that were set to TNA archive links

- For redirects with URLs matching TNA ones, make the type an archive,
  make the archive_url for the particular mapping equal to the new_url
  and then delete the new_url.
- For all other types of mapping (archives, unresolved), if they have a
  new_url matching TNA, blank it.

(Paired with Jenny on this.)
Merge pull request #407 from alphagov/disallow_redirects_to_tna

Disallow redirects to TNA
Fix name of a migration class to not rely on inflection

This migration was failing because the class name was relying on
inflection of 'TNA', but that isn't loaded here. This reverts the
name to 'Tna' so that it runs.
Merge pull request #417 from alphagov/fix_migration_class_name

Fix name of a migration class to not rely on inflection