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.
Don't add fields with no properties to the schema

This stop fields like memberships from being stored as an empty array in
the database, which is misleading because the person might actually have
some memberships, but they're not stored against the person.
Delete memberships from json docs before indexing

Due to memberships being stored in a different collection, we can't index
them in elasticsearch as embedded documents because they may change in
the database but the related record wouldn't be reindexed, so they would
fall out of sync.

In the future it might be worth making the list of fields to exclude
from the json configurable on a per-model basis, so the person model
could be configured to always hide memberships. This could possibly even
be inferred from the JSON schemas somehow.