add embed query to allow expansion of memberships

This adds an embed query parameter which are similar to django's
join specifiers and allows the expansion of the person or organisation
sections of the memberships of a person or organisation

e.g adding ?embed=membership.person to the end of a resource URL will expand all
the persons entries in the memberships of a resource.
?embed=person.organization will expand the persons entries and then the
organization entries within those.

If a blank embed is specified then no memberships are included in the
result. This is for use in situations where only the basic details of
the document are required and hence reduces bandwidth and processing.

If embed=membership is specified of the embed parameter is left off then
memberships are included but not expanded.