Changes to `thread_wakeup`

`thread_wakeup` did not check if target pid is invalid.

`thread_wakeup` used `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.

`thread_wakeup` yielded even if the other thread had a lower priority
than the current thread.
Merge pull request #698 from Kijewski/thread_wakeup-dint

Changes to `thread_wakeup`