BUG: Fix Index construction when given empty generator (#21470).
- [ ] closes #21470 
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21481?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@d5a1232`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff            @@
##             master   #21481   +/-   ##
=========================================
  Coverage          ?   91.92%           
=========================================
  Files             ?      153           
  Lines             ?    49586           
  Branches          ?        0           
=========================================
  Hits              ?    45582           
  Misses            ?     4004           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.32% <100%> (?)` | |
| #single | `41.89% <75%> (?)` | |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21481?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/21481/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.69% <ø> (ø)` | |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/21481/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.62% <100%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21481?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/21481?src=pr&el=footer). Last update [d5a1232...650f810](https://codecov.io/gh/pandas-dev/pandas/pull/21481?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 Maybe also worthwhile to include a test for `iter([])` as well.  @mroeschke Thanks--good call on including iter([]) in tests- turns out calling CategoricalIndex on any non-generator iterator was broken. thanks @Liam3851 