Remove unused APIs from ruff_linter (#27385)
## Summary
This PR removes unused APIs from ruff_linter identified by Hawk 0.1.11.
It is split from #27339 so the removals can be reviewed independently at
the crate boundary.
- 62 net lines removed
- 64 deletions and 2 additions
- 9 files changed