Gmf from ruptures

This PR implements a risk calculator able to compute the event based risk outputs directly from the stochastic event sets, by recomputing the GMFs on-the-fly (https://bugs.launchpad.net/oq-engine/+bug/1349757). The performance is not yet optimal and the calculator should be considered in experimental stage. Future work will change and improve it.

The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/487
I have added a file doc/internals.rst documenting the conventions used for the logic trees.