Mean loss curve computation updated

Addresses:

1) https://bugs.launchpad.net/oq-engine/+bug/1168454 (description recently updated).
2) https://bugs.launchpad.net/oq-engine/+bug/1169886
3) https://bugs.launchpad.net/oq-engine/+bug/1170630