REF/BUG/TYP: read_csv shouldn't close user-provided file handles
- [x] closes #36980
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

REF/BUG: de-duplicate all file handling in `TextReader` by calling `get_handle` in `CParserWrapper`. ~~When `TextReader` gets a string it uses memory mapping (it is given a file object in all other cases).~~

REF/TYP: The second commit adds a new return value to `get_handle` (whether the buffer is wrapped inside a TextIOWrapper: in that case we cannot close it, we need to detach it (and flush it if we wrote to it)). I made `get_handle` return a typed dataclass `HandleArgs` and made sure that all created handles are in `HandleArgs.created_handles` there is no need to close `HandleArgs.handle` (unless it is created by `get_filename_or_buffer`).

I used asserts for mypy when I'm 100% certain about the type, otherwise I added mypy ignore statements.

In the future it might be good to merge `get_handle` and `get_filename_or_buffer`.
cc @gfyoung  the failure on windows when reading ./pandas/tests/io/sas/data/test_sas7bdat_2.csv was caused when `encoding` was `None`. `TextIOWrapper` on windows seems to default to charmap instead of utf-8. Hello @twoertwein! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:













































There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-11-04 02:11:22 UTC @twoertwein can you merge master and ill take another look @jbrockmendel rebased. Sorry for the large diff. Most code changes are from changing the return value of `get_handle`. ```
pandas/_typing.py:1:1: F401 'dataclasses' imported but unused
pandas/_typing.py:6:1: F401 'typing.Generic' imported but unused
```

from pre-commit checks lgtm ping on green. @jreback  green'ish i restarted the pre commit @jreback pre-commit is green thanks @twoertwein really nice!