Move `refurb/helpers` utils to `ruff_python_semantic` for broader use (#6990)
## Summary
The utils added for `refurb` in its `helpers.rs` file could be useful
for many other plugins. (Such as the PERF4XX codes, see e.g.
https://github.com/astral-sh/ruff/pull/6132 ).
This PR moves them to `ruff_python_semantic::analyzers::typing` as
suggested in
https://github.com/astral-sh/ruff/pull/6132#issuecomment-1697910093
## Test Plan
Confirmed `refurb` and all other tests still work