PERF: Improve duplicated perf
- [x] closes #10235
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

`Index/Series.duplicated` now uses dtype-based logic. Also skip algorithm if `Index.is_unique` is `True` (expected to be cached in practical situation).

**asv:**

```
   before     after       ratio
  [bb6b5e54] [16c6da4f]
-   34.41ms     4.69ms      0.14  algorithms.algorithm.time_int_duplicated
-   53.77ms     5.59ms      0.10  algorithms.algorithm.time_float_duplicated
-   60.22ms    40.20μs      0.00  algorithms.algorithm.time_int_unique_duplicated
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
```

**NOTE:** can create template for htable after #13716.
