Use metadata for cache entry status code (#79512)
This avoids relying on the `res.statusCode` for generating a cache entry
during a background revalidate as it shouldn't be coupled to the current
response.
x-ref: [slack
thread](https://vercel.slack.com/archives/C08TP4DCGAG/p1747936529140749)