sys/ucred.h provides a cr_gid macro that should be used to reference the
egid element of an xucred, so let's use that.
While we're here, avoid assuming that the first element is the egid and
include it in the group list unless it *does* match the egid. This is
not a functional change today: the egid is always the first group in
the list, but we may want to consider changing that some day.