REGR: Fixes first_valid_index when DataFrame or Series has duplicate row index (GH21441)
- [x] closes #21441 
- [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/21497?src=pr&el=h1) Report
> Merging [#21497](https://codecov.io/gh/pandas-dev/pandas/pull/21497?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c2da06c8eea4cc0339717aa09acdd6765bc3d673?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #21497      +/-   ##
==========================================
- Coverage   91.92%   91.91%   -0.01%     
==========================================
  Files         153      153              
  Lines       49570    49574       +4     
==========================================
+ Hits        45566    45568       +2     
- Misses       4004     4006       +2
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.31% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.8% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21497?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/21497/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.13% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/21497/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `85.75% <0%> (-0.21%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21497?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/21497?src=pr&el=footer). Last update [c2da06c...751046d](https://codecov.io/gh/pandas-dev/pandas/pull/21497?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
 will rebase and resolve conflict with whatsnew file and push later today thanks @KalyanGokhale 