standard pagegenerators and minor improvements for commons_link.py

partial backport of Iad89d280890938b2d2dbaf1a127e62bb41ea618e

bug: 57027 (2nd part)
Change-Id: I573b2e218922f4a020b90f419504fb49946bccb0
Merge "standard pagegenerators and minor improvements for commons_link.py"