Dump stats at end, not during interval.

This also safely allows ^C to interrupt profiling.