Inconsistent lengths for DataFrame with no columns and non-empty index
#### Code Sample, a copy-pastable example if possible

```python
from pandas import DataFrame

x = DataFrame([], index=[0])
print("len(x) ==", len(x))
print("list(x) ==", list(x))
assert len(x) == len(list(x))
```

On being run this outputs:

```
len(x) == 1
list(x) == []
Traceback (most recent call last):
  File "lengths.py", line 6, in <module>
    assert len(x) == len(list(x))
AssertionError
```

I would expect these two lengths to be the same.

For comparison, both of the following pass:

```python
from pandas import DataFrame

x = DataFrame([[0]], index=[0])
print("len(x) ==", len(x))
print("list(x) ==", list(x))
assert len(x) == len(list(x))
```

```python
from pandas import DataFrame

x = DataFrame([], index=[])
print("len(x) ==", len(x))
print("list(x) ==", list(x))
assert len(x) == len(list(x))
```

#### Problem description

Pandas DataFrames generally behave as a collection of columns. It's part of the implied contract of collections that the length of the collection is the number of elements you get when you iterate over it. This is an example of that being violated. Additionally it seems inconsistent with pandas behaviour in other circumstances.

#### Expected Output

```
len(x) == 0
list(x) == []
```

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

<details>

INSTALLED VERSIONS
------------------
commit: None
python: 3.6.0.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-43-Microsoft
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8

pandas: 0.20.3
pytest: 3.1.2
pip: 9.0.1
setuptools: 36.0.1
Cython: None
numpy: 1.13.1
scipy: 0.19.0
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
pandas_gbq: None
pandas_datareader: None

</details>
