Exporting the GMF in XML should not require keeping all the tree in memory

See https://bugs.launchpad.net/oq-nrmllib/+bug/1227536 and the companion pull request https://github.com/gem/oq-engine/pull/1279