Open
Description
Currently our thread termination tracking logic is quite scuffed.
There is a global watchable handle that is supposed to hold thread status.
But the status is actually also used to figure out if a thread should terminate in __asyncify()
calls.
Calling WasiThread::terminate()
currently succeeds immediately, because it sets said status.
We need to separate things out into a "should shut down" status and a "has shut down" status.