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.
Refactor eachSchema function so it can be used elsewhere

This takes a mongoose instance and a callback and yields each of the
schemas from collections.js to the callback.
Merge branch 'record-at-specified-date'