Save memory when exporting the GMF

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