cred: groupmember() and co.: Sanity check cred's groups (INVARIANTS)
Leverage the normalization check functions introduced in the previous
commit in all public-facing groups search functions to catch programming
errors early.
Approved by: markj (mentor)
MFC after: 3 days
(cherry picked from commit 634675067867090e538b08e62ff9b14d3ffae5a3)
Approved by: markj (mentor)