Initial implementation of public dashboards api

also move factories into common location
includes cheeky over implementation of the find by slug logic
needs lots of tests for this bit
Recursive dashboard fetching
Stop recursing on slug after 3 attempts

This is to prevent aribitrary execution of db queries by constructing a
url with a large directory structure. It is also the current behaviour
of spotlight.
Return 404 with error when no dashboard found

also fix pep8 issues
Move view utils to libs folder

To share the utils across the dashboards and datasets apps because both
use them.
Add a 5 minute cache control header
We need to invalidate on update as well as reauth

Signon will send a reauth message when a user is logged out or
suspended, but a user can also lose permission to our app through their
permisssions being updated.

We should be invalidating on an update otherwise a user can be updated
to not have permissions and carry on using the app. BAD!
Merge pull request #198 from alphagov/bugfix/update-and-reauth

We need to invalidate on update as well as reauth
Fix the level of recursion, find by the remaining path, not popped slug
Refactor to use recursive method from the start - tests still pass
Merge pull request #197 from alphagov/view-onto-dashboard-json

Initial implementation of public dashboards api
Add 4th option to dashboard business-model

This change mimics alphagov/spotlight@b9ec3720ca154d45c782c5a48751feb7f1b8c008.
Merge pull request #199 from alphagov/add-option-to-dashboard-business-model

Add 4th option to dashboard business-model
Add module to data set relation

A lot of modules have relationships with data sets. Sometimes modules
will not, hence the allowance for null.

I've pushed the dashboard app to be initialized after datasets so that
the dataset tables are already there and the module -> dataset releation
can be created.
Add query_parameters to module

As well as a data set we need the query paramters that the module will
need.
Allow querying org types by name

This is case insensitive because we didn't want the case where we ended
up with different org types purely based on the case of their names.
Filter org nodes by name and abbreviation

If both parameters are given they AND not OR. We have chosen to make the
queries case insensitive so we don't end up with nodes differing by
case.
Add serialization to ModuleType
Validate a ModuleType's schema

It would be good to be able to inform the creator of a module type that
the schema they are enforcing for the module options is not valid.
Add endpoint to list and filter ModuleType objects

As with our other filters this is case insensitive.