chroot: don't setgroups() without -G having been specified
We previously would not have setgroups() at all, but now we would drop
our supplementary groups every time. This broke chroot -n, probably
among other things. We need tests here, but lets unbreak things first.
A future change may try to setgroups(2) when -u is specified in addition
to -G, so predicate the call on gidlist and don't populate that without
a grouplist.
PR: 288751
Fixes: 48fd05999b0f ("chroot: don't clobber the egid [...]")