Revamped the profiling setup.

This removes the need for dozens of standalone gnuplot scripts, adds extra
profiling data and makes the actual profiling easier.