Performance monitor to measure times and memory occupation of bottleneck code

See https://bugs.launchpad.net/openquake/+bug/1132017 for the context.
Notice: requires the module psutil