fix: route handlers should validate invalid exports (#83500)
When using an unsupported API in a route handler (eg, `export const
dynamic` with `cacheComponents` enabled), we were not erroring in dev or
failing the build. This is because the transform only asserted on pages
& layouts, and not route handlers.
This updates the handling to also check route handlers.
Fixes NAR-371