[libc] Fix gmtime and mktime for years before zero (#236515)
yrs % 4 is negative for a year before zero, which moved the month out of
range and aborted on the assertion that follows. Mask the low two bits
instead, which is the non-negative remainder
Add the year before zero and year zero to the gmtime test
AI disclosure: this patch was written with Claude Code. I reviewed the
change and ran the new test; it fails without the fix and passes with it
Assisted-by: Claude