The mktime/0 function failed for 1969-12-31T23:59:59Z with "invalid
gmtime representation", because its result -1 is also the failure value
of timegm(), and for 1969-12-31T23:59:58Z with "mktime not supported on
this platform", because of a leftover check for -2.
Tell a failure apart from the valid result -1 by tm_wday, which is set
to -1 before the conversion and overwritten only on success, and remove
the check for -2. Now `-2, -1 | gmtime | mktime` round-trip to -2 and -1,
as do normalized inputs such as [1970,0,0,23,59,59,0,0], which gives -1.
Inputs that the platform rejects, such as years before 1900 on macOS,
still fail with "invalid gmtime representation".