BUG: _nsorted incorrect with duplicated values in index (#13412)
 - [X] closes #13412
 - [X] tests added / passed
 - [X] passes ``git diff upstream/master | flake8 --diff``
 - [X] whatsnew entry

`DataFrame.nlargest` and `DataFrame.nsmallest` does not behave correctly when there's duplicate values in the index. 

Any feedback is appreciated!
I am not sold on this impl. Can you see if there are perf tests (asv) for this, and give a check. There wasn't an existing benchmark for `DataFrame.nlargest`. I wrote my own and I got an `after/before` ratio of 1.37, so there is some speed regression.

Do you have any performance recommendations @jreback if I use the `merge` method? Or should I look into a new solution?  ## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14707?src=pr) is 85.27% (diff: 100%)
> Merging [#14707](https://codecov.io/gh/pandas-dev/pandas/pull/14707?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

```diff
@@             master     #14707   diff @@
==========================================
  Files           144        144          
  Lines         50946      50949     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43445      43447     +2   
- Misses         7501       7502     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [c0e13d1...d03be72](https://codecov.io/gh/pandas-dev/pandas/compare/c0e13d1bccd4a783486eba8cc769db48a7875de8...d03be72c56a8eea3754121b98c9dae70a45a9b0c?src=pr) can you add similar tests for series when duplicates are there the algo might work already, idk.

further I would move ``_nsorted`` to ``algorithms``. maybe rename ``select_n`` -> ``select_n_series`` and call this one ``select_n_frame`` the perf is fine. this is a pretty cheap operation. Tests passed for Series & reorganized the code @jreback 
(Looks like a Travis-CI job failed due to connectivity) ping @jreback. Thanks for your help! I'll also look into reorganizing the nlargest/nsmallest code. trivial change (and needs rebase). ping on green. ping @jreback. Thanks! thanks!