Perform means and quantiles in memory

See https://bugs.launchpad.net/oq-engine/+bug/1358228. 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 potential problem is for large computations. If the memory consumption is too big we must use the tiling approach.
An analysis in under way. It should not be an issue. For instance with 10,000 sites, 1000 realizations, 19 levels and 10 IMTs the expected memory consumption is 10000*1000*19*10*8/1024/1024/1024 = 14 TB.
The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/552

PS: my analysis shows that actually we are using *less* memory than before. The reason is that reading the curves from the database takes much more memory than storing them into numpy arrays. The time spent in the post-processing phase improves drastically. For instance for Yufang's computation went down from 60 minutes to 4 minutes.