Only show the ten most popular tags on the site dashboard
Merge pull request #373 from alphagov/site_dashboard_show_ten_most_popular_tags

Only show the ten most popular tags on the site dashboard
Update db/structure.sql to new format

As of Rails 4.0, db:structure:dump now uses mysqldump rather than a
custom format:

    https://github.com/rails/rails/commit/ccc6910cb034efc6b749e1ae82c748085a671fa9

It now includes a lot more detail - this commit doesn't include any
actual schema changes.
Merge pull request #375 from alphagov/update_structure_format

Update db/structure.sql to new format
Clarify a Cucumber step that creates tags
Merge pull request #374 from alphagov/clarify_tags_step

Clarify a Cucumber step that creates tags
Improve the explanation of unresolved behaviour on the site dashboard
Merge pull request #377 from alphagov/change_unresolved_text_site_dashboard

Improve the explanation of unresolved behaviour on the site dashboard
Add missing leading slash when canonicalising

This means that for a path-like input such as:
  first-level/second-level

we no longer trash it to make:
  /second-level

we instead make it into:
  /first-level/second-level

On the other hand it does mean that other things accidentally pasted into a
paths field will be turned into paths...
Merge pull request #367 from alphagov/add_missing_leading_slash_when_canonicalising

Add missing leading slash when canonicalising
Convert config/migrations to PostgreSQL

* Remove structure.sql, add schema.rb, configure appropriately
* Remove mySQL-specific option values from migrations
* Remove fix_collation_woes, as is all mySQL-specific
* Remove mysql2 gem in favour of pg
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