Order document editions in mongoid

rather than in ruby. This dramatically speeds up listing of documents.

Note: requires a restart
Merge pull request #337 from alphagov/order-in-mongoid

Order document editions in mongoid
Minor updates dont update published_at on docs

When we export documents to the content-api, use the published edition's
published_at instead of updating it if the update is minor.
Move indexable formatters from to correct location

 Formatters for the exporters should live in app/exporters/formatters
rather than thrown into app/lib
Minore updates dont change last_update in rummager

When exporting to rummager we should not update the last_update
timestamp if the change is minor. This will mean that minor updates do
not change the display order of documents.

Manuals do not respond to #minor_update? and therefore we must
use a subclass for specialist documents explicitly.

I have also added tests for all formats using the shared rspec examples.
Merge pull request #339 from alphagov/feature/minor-updates-dont-update-publish-time

Minor updates dont update publish time
Add Discontinued investigation MAIB report type

Ticket:
https://trello.com/c/hlULXxFi/447-add-report-type-for-maib-discontinued-investigation
Merge pull request #340 from alphagov/add-discontinued-investigation-for-maib

Add Discontinued investigation MAIB report type
Publishing docs generates a PublicationLog entry

When we publish a docuemnt generate a PublicationLog entry for use later
in generating change notes.
Export change notes to content-api

When we export documnts to the content-api we should also push the
change notes with it. Let thew exporter pull out the PublicationLog entries
and push them to the content-api.
Dont store publication_history on SpecialistDocumentEdition

We no longer need to store publication_history as this is now stored
in the PublicationLog. So we can remove this from the edition and export
it to thecontent-api on publish for use in the frontend.
Migrate change_history data from Editions
Test PublicationLogs are created
Merge pull request #336 from alphagov/feature/change-note-publication-logs

Change note publication logs
Add required require to prevent development 500
Set bulk_published flag when bulk publishing documents

This can be branched on further down the stack in order to show or hide fields
(updated_at) when a document has been bulk published.

I've added a spec which makes sure that the flag is cleared on subsequent
(manual) publication so updated_at will display.
Merge pull request #341 from alphagov/hide-updated-at-on-bulk-publish

Set bulk_published flag when bulk publishing documents
Change Manual Section format to use underscore

To keep this consistent with other formats the format should be
underscored.
Merge pull request #342 from alphagov/change-manual-section-format-to-underscore

Change Manual Section format to use underscore
Don't touch bulk published on a minor update