[libc] Add getgrent, setgrent, and endgrent entrypoints (#224372)
Implement the POSIX group database iteration entrypoints getgrent,
setgrent, and endgrent on top of grp_utils and FlatFileDatabase.
Non-reentrant calls read into a process-global DynamicBuffer that grows
to the high-water mark of the largest group record seen. endgrent closes
the file stream without freeing the buffer so pointers returned prior to
endgrent remain valid until the next non-reentrant call.
* Add getgrent, setgrent, and endgrent entrypoints
* Define getgrent, setgrent, and endgrent in include/grp.yaml
* Expose entrypoints across Linux target architectures
* Add hermetic integration tests in test/src/grp/getgrent_test.cpp
Assisted-by: Automated tooling, human reviewed.