Make sure memberships are populated in the API

This is quite a crude initial implementation, but it does achieve the
desired outcome of populating the memberships array.

One worry about this is that it might give people the impression that
you can create memberships by POSTing them as part of the person, but I
guess thorough documentation can get around issues like this.
Move json transform into a plugin

This means that all of the add-on functionality for the core popolo
models exists in plugins, which hopefully makes the actual model
definitions a bit clearer.

I think further improvements can be made to the clarity of the model
definitions by merging the collections.js module into models.js. That
way there is one central place which defines the popolo models for the
application.
Enable mongoose debug if MONGOOSE_DEBUG is set

If MONGOOSE_DEBUG is set in the process' environment then we enable
mongoose's debug flag, which logs the queries being performed to STDOUT,
which can be very useful when debugging performance issues etc.
Fix tests that depended on the exact API output

Rather than asserting the whole body of the API response matches our
expectations we instead just check subsets of the body to see if
elements are visible/hidden appropriately.