Added capture_stderr decorator to test_validate_docstrings
- [X] closes #22483
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Originally thought it would be nice to have this as a class decorator, but usage of this conflicts with the `capsys` fixture used by `test_bad_examples` so had to pick and choose where to apply. Additionally the decorator doesn't work out of the box to wrap classes, so it would take a decent amount more code.

cc @gfyoung will present minor merge conflicts with your work in #22531
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=h1) Report
> Merging [#22543](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/100906ef8db3e388f70fb3450ffa39b2939c44e1?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22543/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #22543   +/-   ##
=======================================
  Coverage   92.04%   92.04%           
=======================================
  Files         169      169           
  Lines       50787    50787           
=======================================
  Hits        46745    46745           
  Misses       4042     4042
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.45% <100%> (ø)` | :arrow_up: |
| #single | `42.29% <100%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/22543/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `85.75% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=footer). Last update [100906e...bf3b929](https://codecov.io/gh/pandas-dev/pandas/pull/22543?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 looks fine. whare are they printing to stderr now? @jorisvandenbossche can you point me to where you were seeing this in Travis before? Worth double checking there that this has the intended effect @jorisvandenbossche all green after rebase Looks clean after rebase.  I think we have enough approvals to merge this. 😄 