Apply env inlining during generate build mode (#76990)
This brings back the env inlining step separate of compilation used for
the [flying shuttle
experiment](https://github.com/vercel/next.js/pull/73710) so that when
`next build --experimental-build-mode=compile` is used we don't inline
these values so that these artifacts can be cached/reused independent of
the env values. Then `next build --experimental-build-mode=generate` can
be used to inline the values and run prerendering to generate finalized
build.