Added GroupMembership for group membership checks.

This replaces existing uses of a Set to determine membership and
will make it possible to integrate with group systems that do not
allow efficient enumentation of memberships.

Change-Id: Iba9842ca1a355fc100fb4a02d7954d89032cdba0
30 files changed