[turbopack] Move some of the logic for issue filtering into the rust layer (#88511)
# Optimize issue filtering in Next.js and Turbopack
## What?
This PR introduces an `IssueFilter` system to control which issues are reported based on severity and location
## Why?
To improve performance, we shouldn't spend time formatting issues that will never be displayed to a user.
## How?
- Added `IssueFilter` to control which issues are displayed based on severity and location
- Created a specialized `InNodeModules` context condition for better readability
- Implemented `warnings_and_foreign_errors()` filter that shows:
- Warnings and errors from application code
- Only errors from node_modules
- Applied the filter throughout Next.js and Turbopack's issue reporting system
- Refactored issue collection to filter early rather than collecting everything first