[libc] Introduces gmtime_r to LLVM libc, based on C99/C2X/Single Unix Sp.

gmtime and gmtime_r share the same common code. They call gmtime_internal
a static inline function. Thus added only validation tests for gmtime_r.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D99046

GitOrigin-RevId: 8b35159ac720fcb9914e4931b416e17b0fbda771
10 files changed