Replace SimpleXml by Mediawiki library

This replaces the SimpleXML library by
the internal class XmlTypeCheck

Needs at least that version
 https://gerrit.wikimedia.org/r/#/c/66365/

Change-Id: Iafbd820f7130c8eb8d4f19824632b4ac89f214a9