Translate more banned import config to ruff
Translate some config in `unwanted-patterns-in-tests` to `ruff`. I think the main selling point of `ruff` here is just the ease of implementing new rules, like the currently unenabled `pytest.warns` one.

The major difference is that `unwanted-patterns-in-tests` is currently only enabled in `pandas/tests` while with this implementation, `TID251` will be enabled globally. 

There are several approaches we can explore to reconcile the 2 behaviors. 
- Keep it globally enabled for rule where the number of errors is low (and keep using `pygrep`) for the rest
- Use [hierarchical configuration](https://docs.astral.sh/ruff/configuration/#pyprojecttoml-discovery) (I think `pandas` doesn't use it at the moment, so this will be a fairly big change)

There's an open issue to track the progress of [flat configuration](https://github.com/astral-sh/ruff/issues/7696), which allows us to keep all rules within 1 config file, but there's not much progress lately.
Thanks @tqa236 