Refactoring of risk calculators

Addresses https://bugs.launchpad.net/oq-engine/+bug/1175702