Fix XML output of tests which was not well-formed

XML documents must have exactly one root element, so adding a `<layout>` element around everything.

Also, removing the intermediate hierarchies `<fonts>` and `<commands>`, because they don't add any value to the XML structure.