CI: make docstring checks "instantaneous"

- [x] [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.

This PR reduces the `check_code.sh docstrings` runtime to under 10 seconds. 

The key changes are in [`validate_pep8_for_examples`](https://github.com/dontgoto/pandas/blob/14e3915f21dc35fcdcc5ce198b35245fb51a68dd/scripts/validate_docstrings.py#L151), which was refactored to call the pep8 CLI once with a list of files to analyse. The functions in the call stack above were changed to handle lists instead of single objects as well. I also added a new test since the `prefix` parameter was not properly tested before.

Let me know if you'd rather see this split into multiple PRs.

I'd also wait until #57879 is merged as there will be quite a few merge conflicts.

Unrelated code checks seem to be failing here and in other PRs.
@MarcoGorelli @datapythonista  Sorry @dontgoto, this is now conflicting. Results look very impressive, thanks for the work on this. If you can split it in different PRs that would be great, it'll make reviewing easier. 