Refactor republish documents script and add tests

* Rerender => Republish
* Extract dependency injection to the script level, removing the need to
  inject the wiring into the DocumentRepublisher.
* Rewrite cuke to add a test around the DocumentRepublisher.
* Rewrite seed_cases method in the tests to use the apps service layer
  rather than interacting with the models directly.
* Add method to panopticon helpers to clear the received messages s.t.
  we can ensure a republish happened rather than risk picking up the
  messages from doc creation.
Script to fix inconsistent edition states

Tests live in the script because I don't want them in the test suite.

Should we care about testing this particular test then the test are easily
visible and deletable.
Merge pull request #155 from alphagov/fix-inconsistent-edition-states

Script to fix inconsistent edition states
Merge pull request #157 from alphagov/republishing_script_refactor_with_cuke

Refactor republish documents script and add tests
Add attachment to specialist-publisher
Merge pull request #158 from alphagov/attachment_in_sp_from_content_models

Add attachment to specialist-publisher
Give Document formatters specific "kind"

Instead of being generic about how we register documents with panopticon give them an explicit "kind" which is stored with the PanopticonMapping as resource_type. In order to find these again we will need to change the PanopticonMapping#documents scope to pull all types of specialist-document.

While we are here lets also rename DocumentArtefactFormatter to a CmaCaseArtefactFormatter which is its correct name!
Remove legacy publishing for documents

Previously, we were doubling up on the contents of the details hash in
order to allow publishing to both the Finder API and Content API. This
commit removes the duplicated details hash.
Merge pull request #159 from alphagov/feature/bump-content-models-version

Allow new format types for specialist documents
Remove scopes from PanopticonMapping

The `manuals` scope was unused. The `documents` scope was only used by
the `all_document_ids` method. The only code using the
`all_document_ids` method was the `SpecialistDocumentRepository`.

Rather than getting the list of document ids from `PanopticonMapping` we
can use a `distinct` query against `SpecialistDocumentEdition`.
Remove unused dependency from SpecialistDocumentRepository

It no longer uses `panopticon_mappings` now that it gets the list of
document ids from `SpecialistDocumentEdition`.

Also swap the dependencies to using a hash style instead of ordered
arguments.
Merge pull request #160 from alphagov/remove-legacy-dual-publishing

Remove legacy publishing for documents
Merge pull request #161 from alphagov/remove-panopticon-mapping-scopes

Clean up PanopticonMapping and SpecialistDocumentRepository
Get rid of the simplest wiring instances

These are providing some intermediate indirection without adding much
value.
Remove unused wiring
Don't pass api_client into PanopticonRegisterer

The API client and the way it's constructed is a very stable part of the
codebase. As it's likely to change significantly less frequently than
the PanopticonRegisterer itself needs to change, it's fine to rely on
the concrete details inside the class.

The advantage of doing this is that it reduces indirection (it's simpler
to follow what's happening without dependencies being passed in) and it
removes some noise from the wiring file.
Remove url_maker from wiring

`UrlMaker`s only dependency is Plek, which is both easy to construct and
stable, so make it build that for itself.

Since `UrlMaker` is only used in one place and now doesn't need any
arguments to construct it, just build it directly in the
application_controller.
Move inline simple single-use factories
Extract id_generator wiring into a class
Add ManualServiceRegistry

A registry containing just the services for manuals is simpler to reason
about and has fewer dependencies.

By constructing it in the controller we make the codebase easier to work
with for newcomers whilst keeping the benefits of injecting
dependencies.