fix(ext/node): fix hot loop in `setImmediate` with a pending timer (#31643)
Contains fix from https://github.com/denoland/deno_core/pull/1263.
This effectively reopens https://github.com/denoland/deno/issues/28016
for the time being as we're regressing one of the Node.js compat tests
and the interaction between `setTimeout` and `setImmediate` is a bit
broken, but it unblocks `puppeteer` usage for the time being.
Fixes https://github.com/denoland/deno/issues/31642
Fixes https://github.com/denoland/deno/issues/31595
Fixes https://github.com/denoland/deno/issues/30960