Tag repository KeyError to distinguish from regular KeyErrors

This is a quick fix that allows us to retain use of exceptions for
flow control.
Merge pull request #145 from alphagov/custom-not-found-error

Tag repository KeyError to distinguish from regular KeyErrors
Add AAIB report model and spec

For AAIB transation, the user must be able to create reports on air
accident investigations. This commit adds the model with the necessary
spec.
Add AAIB report artefact formatter
Refactor common CmaCaseForm code to DocumentForm

Create a common class for all DocumentForm objects and make CmaCaseForm
inherit from DocumentForm
Store org slugs with relevent doc types

With the introduction of a 2nd Org using SpecialistPublisher for
Documents, it makes sense for us to store the Org slugs in a hash with
the matching document_types. We can also add to this far easier later.
Generalise SpecDocs away from CMACases

In order to add AAIB reports as a document_type we have generalised the
SpecialistDocumentsController to infer document_type from the user's org.
We have also used this in the views to move the extra fields out to a partial.
Introduce AAIB Reports

AAIB reports can now be created and edited within the system via SpecialistDocumentsController
Testing AAIB Report workflow

Refactored CMA helpers to be non specific for documents
Rename specific builders to reflect their actual class
Refactor doc_type into builder not the service

Instead of passing the document_type to the service allow the builder to decide the document_type
Move common CmaCase code to an abstract Document

Instead of duplicating code between CmaCase and AaibReport share the code in a Document class
Allow Form to handle facets over the controller

Instead of switching the finder schema in the controller based on the user allow the Form object to handle the finder_schema it requires to pull out the facet options for populating the form. This way the Form object can decide which schema to use
Doc services should not be aware of controllers

Refactor services so they no longer require a controller for contact. Instead pass in the required parameters explicitly
Make preview work without permissions errors
Move params into methods for readability

Instead of repeating ourselves lets use methods to grab the required parameters for clarity
Implement finder_schema on DocumentForm

and raise a NotImplementedError as it must be implemented by the super class. While we are here, let's make it private as it is not required to be public.
Merge pull request #147 from alphagov/creating-and-editing-reports

Creating and editing AAIB reports
Update panopticon when updating a case title

When a user created a draft case, then changed the title of that draft
case, specialist-publisher's panopticon mappings would get out of date
with Panopticon as we'd send Panopticon a create for the new slug rather
than issuing an update for the existing mapping.

This resulted in a 500 error when publishing the case as Panopticon
would report the slug had already been taken.

By ensuring PanopticonMapping is kept up to date when a slug change
happens (by finding the existing mapping searching by resource ID, not
slug) we prevent this case.

In order to find the mapping by resource ID, we need to ensure that only
one mapping is described by one resource ID, therefore for
ManualChangeNotes, we generate a unique resource_id by building it from
the parent.

[+ @bestie]
Generalise publishing for all document types

* Core attributes remain first class (slug, title, summary, body)
* All other attributes are added to 'details' field
* Other attributes are selected from the finder schema