Loss per event per asset

Minimal changes to support the feature. See 
The real meat is in the engine. The tests are green: https://ci.openquake.org/job/zdevel_oq-commonlib/151/