ENH: Implement cummax and cummin in _accumulate() for ordered Categorical arrays
- [ ] closes #52335 (addresses first example but not second)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

We implemented the operations cummax and cummin in the _accumulate() function for the Categorical array class. The implementation includes a check that the Categorical array is ordered and is based on other implementations of _accumulate(). Tests for the implementation have also been written and included.

Coauthored with @xiangchris
Thanks @bdwzhangumich 