Remove the hazard_calculation table

This is a huge change, involving the move of several methods of HazardCalculation into commonlib.
See https://bugs.launchpad.net/oq-engine/+bug/1371639.  A companion PR https://github.com/gem/oq-commonlib/pull/40 is needed. The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/698

PS: as a byproduct, https://bugs.launchpad.net/oq-engine/+bug/1267425 is fixed (i.e. intensity_measure_types
should not be specified when the intensity_measure_types_and_levels are specified, in the job.ini or from
the risk models).
I understand this PR is already huge but, at least, a small txt file with the explanation of rules that would be applied to be consistent again with the new logic would be useful.
I.E. in this case "hc = " should become "job" ? what the difference between hc and job_id in this case ?