ENH: Allow performance warnings to be disabled
- [x] closes #56920 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

~This still needs tests - I plan to add tests for disabling the warnings wherever we currently hit a PerformanceWarning in the test suite. But I'd like to get feedback on the linked issue first.~

Tests added.
For the test fixture, I wanted to be able to pass it directly to `tm.assert_produces_warning` instead of having the fixture return True/False and then have lines like

    warn = PerformanceWarning if uses_performance_warning else False
    with tm.assert_produces_warning(warn):
        ... @mroeschke - should be good to merge. Thanks @rhshadrach  Late feedback, but was thinking about this in the context of https://github.com/pandas-dev/pandas/issues/58581, but it would make sense to change the default to something like `None`? This default would mean that users see those performance warnings that we decided to turn on by default. More specifically, that would allow us to add new performance warnings that are _not_ shown by default (in contrast to existing ones), while still giving users a way to turn them on.

 That behavior sounds like an improvement to me, but I'd still prefer #55385 over it. Maybe discuss this alternative there? Would be good to have a list of performance warnings we'd want on by default (I'd guess we'd start with whatever warnings we have now, but that might not be the same as want we want to end up with).