replace defined values and add `__NEXT_HAS_REWRITES` define (#48628)
### What?
This fixes a problem when the router fails to load the correct JS file
from the page_loader and opts out to full refresh
### Why?
The router behaves incorrect when `__NEXT_HAS_REWRITES` is missing in
turbopack
### How?
see also https://github.com/vercel/turbo/pull/4652
### Turbopack changes
* https://github.com/vercel/turbo/pull/4650 <!-- Tobias Koppers - reduce
size of TypeType from 32bytes to 16bytes -->
* https://github.com/vercel/turbo/pull/4648 <!-- Tobias Koppers - handle
chunk register in the sync runtime.none correctly -->
* https://github.com/vercel/turbo/pull/4609 <!-- OJ Kwon -
fix(ecmascript): eval assignop to the ident -->
* https://github.com/vercel/turbo/pull/4652 <!-- Tobias Koppers - allow
to pass constant values to free var references -->
* https://github.com/vercel/turbo/pull/4649 <!-- Tobias Koppers - Image
processing improvements -->