[SYNC] Synchronize with compat, code improvements, enable -xml option

- use mediawiki's comma-separator
- remove obsolete config and catlib import
- remove unused variables

Change-Id: I19a6b377022e00491ba50d3d3e4a01ea0c36f507
Merge "[SYNC] Synchronize with compat, code improvements, enable -xml option"