BUG: groupby with CategoricalIndex doesn't include unobserved categories
- [x] closes #49354 (Replace xxxx with the GitHub issue number)
- [x] closes #49223
- [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).
- [x] 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.

@gt-on-1234 - my apologies here; I was meaning to just tackle #49354 but found that my changes leaked over into #49223. Take a look and let me know what you think.

> * [x]  closes [BUG: groupby with categorical index doesn't include unobserved categories #49354](https://github.com/pandas-dev/pandas/issues/49354) (Replace xxxx with the GitHub issue number)
> * [x]  closes [BUG: groupby with categorical result order differs for index type #49223](https://github.com/pandas-dev/pandas/issues/49223)
> * [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).
> * [x]  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.
> 
> @gt-on-1234 - my apologies here; I was meaning to just tackle #49354 but found that my changes leaked over into #49223. Take a look and let me know what you think.

No problem!  I think this should pretty much cover the changes in #49318 so will close my PR.   Thanks @rhshadrach 