Stop threadend timeout when the thread ends.

Fixes threads waking up early in tests.
Don't wait on LwMutexes with dispatch disabled.
Don't allow wait in event flags without dispatch.

But this happens after other param checks.
Don't suspend/resume dispatch while interrupts off.
Only OpenAsync works with dispatch disabled.

And it even re-enables dispatch.
IO waits don't work without dispatch enabled.
sceIoRead/Write doesn't work without dispatch.

Except stdout/etc.
Don't get stuck on idle when interrupts run.

This was happening when the dispatch thread was disabled.
Merge pull request #1195 from unknownbrackets/dispatch

More dispatch thread fixes