OpenSSH: cherry-pick "need initgroups() before setresgid()"
From openssh-portable commits f3cbe43e28fe and bf944e3794ef, backported
to OpenSSH 7.9p1 on stable/13 [and stable/12].
Reviewed by: delphij
Security: CVE-2021-41617
Differential Revision: https://reviews.freebsd.org/D32460
(cherry picked from commit 172fa4aa7577915bf5ace5783251821d3774dc05)
(cherry picked from commit be74669a2f62915f84b844bb00dd2767c60539fe)