fix(ext/node): make registerHooks resolve hook work for nested imports (#35169)
A `module.registerHooks` resolve hook that rewrites specifiers (for
example appending a fragment for HMR-style cache busting) failed on nested
imports with "Loading unprepared module". The module graph is prepared using
deno_graph's own resolution, which doesn't invoke JS resolve hooks, so a
hook-rewritten URL for a nested import was never present in the graph
when deno_core later requested it.
When a resolve hook is active and the requested specifier is missing
from the graph, the loader now prepares it on demand before loading, the same
best-effort preparation already used for load hook redirects.
Fixes #35163