libc: Add getgrgid_r for group querying

getgrgid_r(3) is needed when querying file attributes from Java (see
java.nio.file.Files.readAttributes()).
This is needed for long format (-l) flag of ls.

getgrgid_r also requires sysconf(_SC_GETGR_R_SIZE_MAX)

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>