Properly handle spaces/underscores in mw.site.namespaces

The PHP call that makes mw.site.namespaces work case-insensitively
doesn't handle non-standard spaces/underscores. So standardize them
before the call.

Bug: 56216
Change-Id: I4758478b126858fb581614f64eb15472f42fef51
Merge "Properly handle spaces/underscores in mw.site.namespaces"