task: schedule sticky tasks correctly with _wait2 (#42750)
The `_wait2` function is similar to calling `schedule + wait` from
another `@async` task, but optimized, so we want to observe the same
side-effects of making the task sticky to the correct thread (and not
accidentally making it sticky to the later task that handles the event).
Refs #41334 (75858d73322)
Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com>