rts/OSThreads: Improve error handling
While looking at the Darwin GC performance regression described in #20144 (closed) I noticed that the error handling in the OSThreads implementation is inconsistent at best. Fix this by pushing error handling into OSThreads
where possible.