Refactor move meta module to use pure DOM based processing

The previous implementation was a combination of SAX parsing, custom
serialisation into a file output stream, custom
serialization into a StringWriter, parsing the writer contents into a
DOM document, and custom DOM serialisation into a writer. The new
implementation replaces this with simple DOM parsing and JAXP
serialization.