Move the code from configure.in into
this macro that resorts to looking for getgroups in -lbsd.
Set new shell variable, GETGROUPS_LIB (that callers should check),
if it is found there.
Rewrite the test so that systems lacking
getgroups don't try to use the supplied replacement function --
that depends on the existence of such a function.