Default to_* methods to compression='infer'
- [x] closes https://github.com/pandas-dev/pandas/issues/22004
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

This PR does the following:

- Update default compression for `to_csv`, `to_json`, and `to_pickle` methods to infer.
- Adds `test_compression_defaults_to_infer` to test that compression='infer' is default for the relevant to_* methods.
- Fixes a bug in CSVFormatter where setting `compression='infer'` with a file object would produce a RuntimeWarning.
- Adds documentation to `test_compression_warning` which can fail due to a pytest bug.
- Cleans up how the encoding argument in CSVFormatter is processed.
- Moves compression tests from `pandas/tests/test_common.py` to `pandas/tests/io/test_common.py`