Merge pull request #187 from alphagov/feature/organisation-api

Feature/organisation api
Make OAuthUser swallow errors

This can happen if the database goes into a readonly state (for example,
when doing an upgrade or machine migration). Read requests should still
function as expected so the OAuthUser methods must be resilient to this.
Merge pull request #188 from alphagov/make-oauth-user-cache-silent

Make OAuthUser swallow errors
Add statsd counter around OAuthUser db errors
Merge pull request #189 from alphagov/make-oauth-user-cache-silent

Add statsd counter around OAuthUser db errors
Improve get_user timing in statsd

Since the original statsd timer was added, caching of users in
PostgreSQL has been added. The timer is now heavily sqewed.
Merge pull request #190 from alphagov/improve-get_user-timing

Improve get_user timing in statsd
Dashboard models

Basic dashboard model, not including modules or organisations

Most fields are pretty standard fields using djangos orm, but links are
a separate model. There is only one transaction link per dashboard, but
multiple other links can be added

The serialize method will return a dictionary that can be jsonified in a
format spotlight expects
Update the version of PyHamcrest

Everything still seems to pass our tests and it adds some new matchers
(hello calling/raises)
Migrate models into sub-directory

The dashboard model is pretty massive and the thought of adding modules
to the file too gives me the heebies. I've broken the dashboard model
out to its own file so that we can break up all the models needed by
this app.
Add Module and ModuleType to dashboard app

Dashboards' have many modules and we need to represent them. Each module
has a type which enforces the schema for the options JSON blob. This
JSON blob for options exists so that we do not need a table for each of
the module types. We are not going to be querying into this field as
part of an app, only ad-hoc so a JSON field should be perfect.

The two main requirements for modules are that no two modules can have
the same slug on the same dashboard and that a module's options should
validate against its type's schema.

Slug uniqueness test has a transaction.atomic wrapper on the create
because of the way django deals with transactions:
http://stackoverflow.com/questions/21458387/transactionmanagementerror-you-cant-execute-queries-until-the-end-of-the-atom