Revise insured losses algorithm

Companion of https://github.com/gem/oq-risklib/pull/61