Hazard curves from gmfs

It is now possible to generate the hazard curves from the GMFs without storing them in the database, see .
A QA test case_6 has been added for this feature. There is also a lot of refactoring since I discovered that the produced hazard curves were not reproducible, depending on the random order of the ruptures as read from the db.
The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/577