XmlSerializer generates XML directly rather than going through TinyXml

This makes serializing to XML slightly faster, and reduces the memory use quite a bit