Updated the engine to cope with the changes in risklib and commonlib

This goes together with https://github.com/gem/oq-risklib/pull/80 and https://github.com/gem/oq-commonlib/pull/52
The tests are running here: https://ci.openquake.org/job/zdevel_oq-engine/786