PERF: Improve Period hashing
- [x] closes #12817
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

```
# asv
-   33.75ms     3.22ms      0.10  period.period_algorithm.time_period_series_drop_duplicates
```

i think this needs a rebase
 ## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13705?src=pr) is **84.54%**

> Merging [#13705](https://codecov.io/gh/pydata/pandas/pull/13705?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13705   diff @@
==========================================
  Files           141        141          
  Lines         51161      51161          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43252      43252          
  Misses         7909       7909          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [4c9ae94...e1fb7f4](https://codecov.io/gh/pydata/pandas/compare/4c9ae94f1ee4d867e2d92735d5755d43daef618d...e1fb7f426c7c7b9213c89c4e56356e1edbe45459?src=pr)
 thanks!
