Initial working version of person merger

Allows merging one person into another person. If there is an
unresolvable conflict then this will return an error, otherwise it will
copy the values over.

Currently this just handles basic fields, still need to add support for
arrays of values.
Handle merging arrays together
Ignore hidden paths when merging records

This means ignoring the _id, _internal, __v and other such fields as
they are internal to the individual record and don't need to be copied
across.
Add REST interface for merging people

This allows you to merge two people together via the API, the original
person is updated with the properties of the record to be merged in,
then the record that was merged in is deleted.
Ensure a person can't be merged into themselves

Return a 400 error with an appropriate message if a user tries to merge
a person into the same person.
Return an error when conflicts can't be resolved

If the two documents have differing fields which can't be resolved then
return a 400 error informing the user that they need to take further
action before the records can be merged.
Ensure fields that aren't in the schema get merged

Rather than using 'schema.eachPath', which only iterates over fields in
the schema, we simply key the keys of the model being merged in and
iterate over those instead.
Add test for other collection merging errors

It shouldn't be possible for other collections to be merged, make sure
an error is produced in this situation.
Ignore the 'id' field when merging documents
Handle merging arbitrary arrays of things

Don't assume that arrays will always contain mongoose objects, instead
test for toObject method and if it's not there just compare the two
objects normally.
make sure memberships going into ES are translated

pass the memberships plus the inflated documents contained within them
through translation on the way into ES. As part of this we now convert
_id to id on memberships going into ES but this makes them consistent
with everything else.
create memberships included inline when POSTing

If a document POSTed includes a memberships field with memberships in
then these will be created along with the document. If there's a problem
then nothing will be created and an error returned.

Automatically fills in the relevant id in the membership if it's missing
and also falls over if the id in the membership does not match the
created document.

Returns the documument with the memberships included if successful.
initial version of inline memberships with PUT

Updates memberships when included in a PUT including removing
memberships not included and updating any existing ones. Currently not
atomic though.

Needs to be refactored to reduce common code and make the structure a
bit tidier.