Check the _id and id fields in findMemberships method

When documents are constructed from search results they only have an
'id' field. When they are newly created they only have the '_id' field,
so we check for both.
Populate memberships in search results