TS-1766: add test_xml_parser to the build

Add the test_xml_parser tool to the automated test suite. Fix various
small XML library issues, mainly const correctness.