Distribute-by-rupture phase 2

The event based calculator is now able to compute the GMFs from the ruptures stored in the database,
see https://bugs.launchpad.net/oq-engine/+bug/1321681.
The tests are green: https://ci2.openquake.org/job/zdevel_oq-engine/467/

NB: the companion PR https://github.com/gem/oq-commonlib/pull/24 is needed.