Don't suggest the idea of pretty urls in README

As part of https://github.com/mysociety/popit/pull/341 we don't want to
be emphasising "pretty urls" as a use case for custom ids. So instead
I've changed the README examples to use David Cameron's id from the
parlparse members.xml.
Refactor /:collection/:id route

Handle missing doc earlier and return to prevent excess nesting. Also
take advantage of the jsonp function taking a status code as the first
parameter to simplify 404 handling code.
Add withBody middleware to handle options root wrapper

If the query string parameter `include_root` is set to `false` then
don't wrap the response in a `result` wrapper. This only affects the
following routes:

- GET /:collection/:id
- PUT /:collection/:id
- POST /:collection

Any routes that list objects will not be affected by this parameter
because the pagination will use the root of the response to put
properties like `total` and `per_page` and `next` links.
Add documentation for include_root parameter

When a user is querying the API they can optionally skip the root
wrapper of the API by providing the include_root=false parameter.
Merge pull request #31 from mysociety/api-output-parameter

Api output parameter
Add metadata to paginated pages

Include 'total', 'page' and 'per_page' properties on result listings to
make it easier to navigate through the paginated pages.
Add next/prev links and has_more flag to pagination metadata

Adds next_url/prev_url properties to the API output if there are more
pages of results. I've also added a has_more boolean flag which
indicates if there are more pages of results, although this can be
detected by the absence of a next_url property, it seems nicer to have
it in here explicitly.
Make search pagination metadata consistent with listings

Refactors the code from the previous commit so it can be used by both
the listing pages as well as the search results.

I've added a currentUrl middleware which makes it easier generate links
to previous/next pages.
Merge pull request #37 from mysociety/pagination-metadata

Pagination metadata
Add member property to membership schema

I'm adding this property to the popolo+mysociety/membership.json schema
initially, as this isn't officially part of popolo yet.

This property will be used as a polymorphic reference to the person OR
organization that is related to the organization of the membership.

This is to help support the concept of coalitions in PopIt, the idea being
that there is an organization which represents the coalition, then the various
political parties that are part of the coalition have a membership
record where the party is the "member" of the membership, and the
coalition itself is referenced through the "organization" property.
Find memberships using the "member" property

This retains backwards compatibility with the previous implementation
that used `person_id` to identify the person that was associated with
the membership. Now you can associate any type of object with a
membership, though it's most likely to be a person or an organization.
Update fixtures to use new member notation

To support coalitions the "person_id" string on memberships has become a
polymorphic "member" object with an "@type" and "id" property. This
allows either a person or an organization to hold a membership.
Move the membership finder plugin into a module

For consistency with the rest of the codebase, mongoose plugins should
live in "src/mongoose/".
0.0.14
Add date filter middleware

This middleware checks for an ?at parameter and if present it turns it
into a javascript date object and exposes it to the models toJSON
method. This will allow us to filter based on the date given inside the
json transform method.
Filter other_names in json transform method

If the ?at parameter is given then we filter out the other_names entries
which wouldn't have been present on the given date.
Filter memberships when ?at parameter is present

As well as filtering the other_names property, we want to filter a
record's memberships when the ?at parameter is present.
Updates per_page to 200
Merge pull request #42 from ciudadanointeligente/master

Updates per_page to 200
Add tests for person/org memberships

Make sure that memberships are populated correctly when they are
returned from the API.