pagegenerators with colons loads categories with incorrect namespace

Handle categories with colon by adding Category namespace.

Refactored to reduce code duplication between handling of categories and
subcategories:
- getCategoryGen and setSubCategoriesGen merged in a single function

Fixed bug in setSubCategoriesGen():
- using # instead of | is also allowed

Bug: 72093

Change-Id: I64490ee396a5b9994ade2e6f3bf359f592270e75
Merge "pagegenerators with colons loads categories with incorrect namespace"