Do not use `inIRQ` to det. interrupt enabled state

`thread_wakeup` uses `dINT` and `eINT` directly.

It should use `disableIRQ` and `restoreIRQ` instead, because there might
be other (good) reasons why one might want to call `thread_wakeup` with
interrupts disabled.