Period factorization
- [x] closes #14338
- [x] tests not needed / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

asv 

```
   before     after       ratio
  [c41c6511] [96b364a4]
-     2.44s    46.28ms      0.02  groupby.groupby_period.time_groupby_sum
```

Continuation of #14348

## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/14419?src=pr) is 85.26% (diff: 100%)

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

``` diff
@@             master     #14419   diff @@
==========================================
  Files           140        140          
  Lines         50634      50634          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43173      43173          
  Misses         7461       7461          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7d40f18...a77ccc2](https://codecov.io/gh/pandas-dev/pandas/compare/7d40f18718ba80e8b8d706eaed2fc4c098686e71...a77ccc21df5316a630d138d4a5afe62e3e1491f6?src=pr)
 @chris-b1 Thanks!
