fix: replace original request body after middleware execution (#77662)
In https://github.com/vercel/next.js/pull/77553 we fixed reading the
request body in middleware using the `nodejs` runtime. However, this
caused issues with subsequent reads like in server actions. In sandbox,
[we
run](https://github.com/vercel/next.js/blob/1e62ce2c61048ddc0297f1a4f268894541975521/packages/next/src/server/web/sandbox/sandbox.ts#L146-L148)
`.finalize()` after middleware is executed so we should do the same
here.
Fixes https://github.com/vercel/next.js/issues/77646
---------
Co-authored-by: JJ Kasper <jj@jjsweb.site>