Fixed a critical bug with --hazard-output-id

This option does not work anymore. I am adding a test sensible to this option, as requested in https://bugs.launchpad.net/oq-engine/+bug/1250022. Everything is green: https://ci.openquake.org/job/zdevel_oq-engine/605