renamed mean_loss to average_loss

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