Don't do DB access in the view: saved_mapping_ids
Move bulk add mappings filters into a module

* Previously, we had to duplicate the same filters across controllers
* Since we're already including the module, make that include happen
  via a method call instead
* That method call passes through the options to before_filter
* Since the use of the filter also depends on find_site, move that
  into the module too
Be consistent in language with other mixins

* acts_as_taggable_on
* has_paper_trail
* tracks_mappings_progress (not the imperative track_mappings_progress)
Merge pull request #282 from alphagov/refactor_saved_mapping_ids_module

Move bulk add mappings filters into a module
Merge pull request #281 from alphagov/refactor_saved_mapping_ids

Don't do DB access in the view: saved_mapping_ids
!!! db/structure.sql diff after altering table collations

The table collations appear to be right now, but the text columns in
the affected tables now specify character set but not collation.
We should work out why this is and FIX IT, but I just want to get this
diff out of the way for now so I'm committing it here.
Stop duplicating status strings for SUPPORTED_STATUSES
Rename SUPPORTED_STATUSES to be http-specific
Add a 'type' column to the three mappings tables

This column stores the mapping type as a word string rather than as
an HTTP status code string. There isn't an appropriate HTTP status code
to use for unresolved mappings, so this is the cleanest way to store
users' decisions about mappings in the long run.

The new column has the same null constraints as the existing
http_status column on that table in each case.

This commit also adds validations for Mapping.type and sets the type
from http_status before validation. The type is not yet being set
correctly everywhere, but all the existing tests pass.
Set mapping type when importing from Redirector
Add a test to document import of '418' mappings

We currently have 198 mappings in production with an http_status of
418, which Redirector used for 'pending content', to signify that
content was coming but was not yet published, so couldn't yet be
redirected to. Bouncer serves 404 for these.
Only set type if http_status is supported

This means that the standard shoulda matcher for testing inclusion
validation works, because otherwise it wasn't able to set an invalid
value without it being changed by the callback before validation.
Add a one-off rake task to set type for existing mappings

This took 22 seconds to run in dev with 636,459 mappings
(replicated from production earlier this week).
Preserve '418' http_status as 'pending_content' type

This isn't a valid mapping type, but we already have 198 mappings
with http_status '418' in the production database because they
were imported from Redirector. We should not lose this information
about these mappings when switching to using the new type column.
Use type instead of http_status in Mapping model

This is a first step towards this goal, and will have broken lots
of things. The mapping model specs pass right now, though...
Make bulk tagger view model specs pass again
Make mappings batch model specs pass again

Now all model specs are passing.
Make mappings_from_host_paths specs pass again
Make Whitehall mappings import specs pass again
Make MappingsBatchOutcomePresenter specs pass again