Fix the memory occupation issue for the scenario_risk calculator

See https://bugs.launchpad.net/openquake/+bug/1132018

The discussion of the problem is in https://bugs.launchpad.net/openquake/+bug/1132017, where it is said why I changed the distribution logic of the scenario hazard calculator (was per realizations, now it is per block of sites).

I am pretty much convinced that the change of logic did not introduce any unwanted change since not only all the qa test pass, but also the numbers for the scenario_damage (which uses the data in the gmf_scenario table computate by the hazard scenario calculator) are the same. They also are in pretty good agreement with the numbers
provided by Vitor using Matlab: this means that the changes in the hazard getters made by Luigi are also correct.

For reference, here are the numbers; A, DS, RC, UFB, W are taxonomies in the Kathmandu exposure_model_grid.xml file, in the first line there are the damage distribution by damage state computed by Vitor, in the second line the damage distribution by damage state computed by the engine.

  A 515830 120910 126020 203260 1174600 -- Vitor
   {517891,121849,127036,204826,1169065}  -- Engine

  DS 142240 49362 92080 60575 622160 -- Vitor
    {142305,49152,91992,60697,622272}  -- Engine

  RC 2506 731 1430 1887 10241 -- Vitor
    {2477,717,1416,1887,10297}  -- Engine

  UFB 300490 87416 158960 106760 656720 -- Vitor
     {301611,88072,160198,107500,652963}  -- Engine

  W 270180 84014 111060 82383 445460 -- Vitor
   {271378,84691,111912,82889,442229}  -- Engine

  TOTAL: 1231200 342430 489560 454860 2909200 -- Vitor
        {1235662,344480,492554,457799,2896826}  -- Engine

Vitor says that 5% agreement is fine and we are better than that.