XMP refactoring
Continued from !342 (closed), but the XMP parsing code is taken from the PDF backend not the patch there, moved into libdocument, and some fixes applied.
Continued from !342 (closed), but the XMP parsing code is taken from the PDF backend not the patch there, moved into libdocument, and some fixes applied.