Companion pull request to https://github.com/gem/oq-commonlib/pull/11 (split_by_trt)

The tests are running here: https://ci.openquake.org/job/zdevel_oq-engine/434/