util.xml: Deduplicate handlers for restricted XML
Makes the code more like util.xmppstream, allowing easier comparisons if
we ever need to apply fixes in the future.
-- Windows platform stubmodule:set_global();-- TODO Add Windows-specific things here