License issue: terminal.py contains code licensed under Creative Commons
#### Code Sample, a copy-pastable example if possible

NA

#### Problem description

The file [pandas/io/formats/terminal.py](https://github.com/pandas-dev/pandas/blob/master/pandas/io/formats/terminal.py) contains source code taken from [stack overflow](https://stackoverflow.com/questions/566746/how-to-get-linux-console-window-width-in-python) (it explicitly says this in the [terminal.py file](https://github.com/pandas-dev/pandas/blob/a327920673868db898d85ed937c1582fc6437ca2/pandas/io/formats/terminal.py#L4)). However, the source code that exist in stack overflow is licensed under [Creative Commons Attribution-Share Alike](https://stackoverflow.com/help/licensing), see: https://stackoverflow.com/help/licensing.

Pandas claims to be [BSD 3](https://github.com/pandas-dev/pandas#license) compliant, but it actually has code in terminal.py that is not under BSD.

Keep in mind that the part of the code that is under creative commons is affecting the python 2 implementation. The python 3 implementation does not need the code from stack overflow. So, some possible solutions would be (there might be other options that I am not aware of):
1. Remove the code that is under CC. This will make the terminal.py unusable for python 2.
2. Use backports.shutil_get_terminal_size and replace the code under CC. This will make pandas depend on the backports.shutil_get_terminal_size package.
3. Provide a brand new implementation for the part of terminal.py that is under CC.

#### Expected Output

NA

#### Output of ``pd.show_versions()``

NA
