BUG/CLN: Minimize number of ResourceWarnings
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

I think I got all `ResourceWarning`s when running:
`PYTHONWARNINGS=default pytest pandas/tests/io`
thanks @twoertwein 