Perform means and quantiles in memory

The computation of the stats in the hazard calculators is ultra-slow because a huge amount of data is read from the database. However that same data can be kept in memory and everything can become extra fast. The devil is for large computations. If the memory consumption is too big we must use the tiling approach.