Add missing test coverage for edition ordering

These ordering scopes fallback to ordering by document_id to prevent
editions jumping around when they are re-editioned with minor changes.
See https://github.com/alphagov/whitehall/commit/b2abdff5
Fix Edition.in_reverse_chronological_order

It was returning the wrong ordering when editions shared the same
timestamp and document.
First stage supporting page cleanup

This enables us to remove duplicate migrated supporting pages from the
revision history. Note this is performing a hard-delete on both the
editions and their supporting pages.
Second step: repair version numbers/change notes

This fixes the major/minor flag, change notes and numbering of
supporting pages. The intention is the following:

1. The first migrated version is the only one that is designated as
a major change.
2. Change notes for migrated versions are cleared
3. All migrated versions get a published_version of "1.0"

The reasoning is as follows:

We want to be able to include the change history of supporting pages
along side the parent policy, but at the moment, all editions are
marked as being  a major change and have adopted the change notes of
the policy. This means that a combined change history would include
duplicate change notes and would include each revision of the
supporting pages, regardless of whether there were any actual changes
to the page. The above chnages mean that only the very first migrated
edition will be included in the change history (the only major
change). This will result in a sane history, as we can rely on the
parent policy supplying any relevant change notes for the supporting
pages created prior to migrating them to editions.

The change notes and minor_change flag are not updated for any
supporting page editions created after the migration, as these would
have been revised by an editor and should therefor have sensible
minor_change/change note values. We do however re-number these
editions, as they will be incorrectly numbered - because the migrated
editions had nil version numbers, the revised editions would have been
designated as the first published version and given a version number
of "1.0".
Update repair_version_history to fix timestamps

Once the version numbers have been corrected, we can fix and
re-calculate the publishing timestamps for the editions by correcting
the first_published_at timestamp and saving the edition. The
public_timestamp will automatically be re-caluclated by the
set_public_timestamp callback on the model.
rake task to cleanup supporting pages
Performance improvement to data cleanup

There are some supporting pages that have lots of editions. Instead of
running string comparison against all editions titles and bodies
repeatidly, we pre-compute hash digests of all editions and use that
to check against for duplicates.
Include attachments in duplicate checks

Some revisions may only make changes to the attachments.
Correct numbering of migrated editions

No two editions should have the same version number...
Correct major_change_published_at where required

These were incorrectly set to the major_change_published_at of the
parent policy for migrated supporting pages. As they are all being
designated as minor changes, we can set them all to the same value -
the first published at timestmap.
Tidy-up digest collection and typo in tests
Merge pull request #1115 from alphagov/cleanup-supporting-pages

Cleanup migrated supporting page data

https://www.pivotaltracker.com/story/show/61719608