Really test that the jump to mapping dialog finds a site

- Before, this was only testing for the presence of the site host in any
  form, which would have matched on the error page's <p> tag and passed.
  We don't want it to match an error page, we want to know that the site
  has been found, so test for the site host in header text.
- Add a test for the "Unknown site" error page case.
- Remove www. in the test data to be consistent with the factory—I'd got
  confused with the thing I did for finding non-www sites.
Add unique index to ImportedHitsFile.filename

Conceptually there is only one hits file at a given path; if the
content has changed, then the hash will also have changed and it
will be reimported. This enforces this at the database level.
Validate uniqueness of ImportedHitsFile.filename
Merge pull request #404 from alphagov/uniqueness_of_imported_hits_files

Ensure that ImportedHitsFiles are unique by filename
Merge pull request #400 from alphagov/really_test_jump_to_mapping

Really test that the jump to mapping dialog finds a site
Allow the CNAME to display on multiple lines

- Long CNAMEs like
  `redirector-cdn-ssl-businesslink.production.govuk.service.gov.uk` were
  causing the configuration table on the site dashboard to stretch
  beyond the margins of the container box. It's unlikely that we'll ever
  get this with IP addresses, but apply the breaking to everything in
  that `<td>` anyway.
Merge pull request #402 from alphagov/wrap_cname_on_site_dashboard

Allow the CNAME to display on multiple lines
Remove lib and rake tasks for import mappings

* Redirector is retired. We don't import mappings from it any more.
Merge pull request #405 from alphagov/remove-import-mappings-task

Remove lib and rake tasks for import mappings
Convert config/migrations to PostgreSQL

* Remove structure.sql, add schema.rb, configure appropriately
* Remove mySQL-specific option values from migrations
* Remove mysql2 gem in favour of pg
* Empty the migration which fixed MySQL collation
  This migration was used to fix some collation inconsistencies in
  MySQL but we don't need its functionality on PostgreSQL. The migration
  will remain in the schema_migrations table in the database, so we're
  leaving this file in place but with empty methods to avoid the
  potentially confusing '********** NO FILE **********' message shown by
  `rake db:migrate:status`.
Explicit TNA timestamp conversion

* mySQL used to implicitly convert this
* We aren't in Kansas any more
Use correct type for http_status

* mySQL would handle this implicitly
* Postgres doesn't, thank $DEITY
Fix list ordering in host/mapping_controller specs

* Used to work by coincidence in mySQL
* We're only interested in the set, not the order
Site#default_host depends on host insert order

* Make that explicit, we got away with it in mySQL
Get everything failing for a reason

* Raise RuntimeErrors with suggestions so we can see what
  class of problem breaks what in specs
* Gives us something to fix. Ignoring features right now,
  concentrating on specs
Postgres: fix organisation sites scope

* Digit boolean becomes boolean literal
* Can't alias the COUNT in the HAVING
* ONE, ah ha ha
* TWO, ah ha ha
Fix hits update

* Add upsert support that was missing from the spike
Fix the import of DailyHitTotal

* Split upsert into two queries
* Be specific about the behaviour the specs are testing
Fix sort by hits

* Postgres requires NULLS LAST on an ORDER DESC, apparently
* We can get away with the GROUP BY primary key trick for the rest
Fix HitsMappingsRelations import

* Straight mySQL -> postgreSQL swap
* INSERT IGNORE simulation and ANSI update style