BUG: Enable stata files to be written to buffers
Enable support for general file-like objects when exporting stata files

- [x] closes #21041
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21169?src=pr&el=h1) Report
> Merging [#21169](https://codecov.io/gh/pandas-dev/pandas/pull/21169?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1abfd1bfdb26e9f444b4f44ffbcd2e37026e6497?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

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

```diff
@@           Coverage Diff           @@
##           master   #21169   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files         153      153           
  Lines       49505    49505           
=======================================
  Hits        45466    45466           
  Misses       4039     4039
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.23% <ø> (ø)` | :arrow_up: |
| #single | `41.88% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21169?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/21169/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.22% <ø> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21169?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/21169?src=pr&el=footer). Last update [1abfd1b...e4a66f0](https://codecov.io/gh/pandas-dev/pandas/pull/21169?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 @jreback I think I got them all. thanks @bashtage

always nice to have PRs from you! @jorisvandenbossche looks like master broke on geopandas test? https://travis-ci.org/pandas-dev/pandas/jobs/383432151 > @jorisvandenbossche looks like master broke on geopandas test? https://travis-ci.org/pandas-dev/pandas/jobs/383432151

No, nothing pandas related, "just" conda forge dependency problems