Added profiling configuration flag.

* If enabled, workers will dump out cProfile stats to files in the
  configured directory.
Added read_stats.py utility.