rpc.lockd: avoid embedding assumptions about cr_groups[0]
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 is actually 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.
Reviewed by: olce
Differential Revision: https://reviews.freebsd.org/D51151