Migrate pages API routes to handler interface (#78166)
This is one of the intial migrations for
https://github.com/vercel/next.js/discussions/77740 which starts by
adding the `handler` signature for pages API routes. This new `handler`
signature will be added for all route types and allows a consistent way
to invoke entries.
This also aims to align all logic to no longer be special cased between
minimal mode, standalone mode, and just normal `next start`. All modes
will behave and process requests the same at the entry level after this
is done.
Once all route types are migrated `next-server`, `web-server`, and
`base-server` will no longer be necessary and a minimal matching layer
will be provided to process rewrites/dynamic routes to the related entry
instead.
The changes here we validated against the `vercel/vercel` [test suite
here](https://github.com/vercel/vercel/pull/13231) and
---------
Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com>