Turbopack: Register react refresh exports in module factory (#8191)
This moves registration of a module’s exports with react refresh to
within the module factory itself, rather than the code that executes the
factory. This colocates this conditional code with the code that
registers individual symbols, and allows us to only run it on modules
that truly require refresh (i.e. user app code, not `node_modules`).