Added thorough network and CPU measurements.

Now the script outputs the fraction of time using disk / network /
CPU, the fraction of time waiting on each resource, and the percentage
speedup if the resource were infinitely fast.