clock_gettime: Fix CLOCK_THREAD_CPUTIME_ID race
Use a spinlock section instead of a critical section to synchronize with
statclock(). Otherwise the CLOCK_THREAD_CPUTIME_ID clock can appear to
go backwards.
PR: 262273
Reviewed by: markj
(cherry picked from commit 28d08dc7d051a4e058cc0004cf4dd884f87037a2)