histfactory: add write_measurement and patch_xml
Merge pull request #438 from ndawe/master

[MRG] histfactory: add write_measurement and patch_xml