[BUGFIX] Add missing categories menu utility

When the feature introducing categories-based page menu was
introduced, a utility class was eventually forgotten. This
patch restores it.

Resolves #51524
Releases: 6.2

Change-Id: I447b22a80252eb8c7ede80daa11cfc7db5144479
Reviewed-on: https://review.typo3.org/23466
Reviewed-by: Francois Suter
Tested-by: Francois Suter