category.py: consider also /doc subpages in template ns

For templates, categories can be in /doc subpage.
Added the check of the /doc page as well.

Modified:
- textlib.removeDisabledParts()
- textlib.getCategoryLinks()
- page.change_category()
to optionally consider also categories in tags otherwise removed.

Also Pep257 fixes in textlib.py

Bug: 55017

Change-Id: I8faecb5f0de75c0f9b635815c6a73ac367bfb2f1
Merge "category.py: consider also /doc subpages in template ns"