Fix deleting organization memberships

This is the "quick fix" version which simply duplicates code from the
person app. This should probably be moved into the generic document app
to reduce unnecessary duplication and prevent future inconsistencies.