added support to return a list of group memberships

This should be a Set not an ImmutableSet (though I agree the actual instance passed here should be an ImmutableSet).