Optimized hazard map post-processing

https://bugs.launchpad.net/openquake/+bug/1087661

See bug comments for details about computation time and memory consumption reductions which these changes provide.