Cleanup of the hazard getters and small improvements to help the performance analysis of risk calculators

This is in preparation to https://bugs.launchpad.net/oq-engine/+bug/1175941