added averageLoss to loss curves

Changes required by https://bugs.launchpad.net/openquake/+bug/1152237