worker: add postMessageToThread
This PR is a total rethinking of #53488.
This PR adds a new API to worker_threads called postMessageToThread
that allow to send arbitrary messages to any worker thread just identifying it by its threadId.
The recipient thread must have a listener on the new workerMessage
event emitted on process
otherwise the postMessageToThread
will throw an exception.
In order not to have any thread block, the call is async
to use Atomics.waitAsync
.