wgNamespaceIds in JavaScript didn't include canonical namespaces. Adding them to it, in a similar way that Language->getNamespaceIds does it for the localized namespaces and the namespace aliases.
Fixes bug in mw.Title constructor when .setNamespace() is used with a canonical namespace on a non-English content-language wiki.
Example: On a German wiki "var foo = new mw.Title('bar').setNamespace('file')" will throw an Error, as wgNamespaceIds only contains localized namespaces + namespace aliases, not canonical ones (in contrary to the assumption that has been made in various places).
(bug 25375) Add canonical namespaces to JavaScript "wgNamespaceIds"