Update the traceprof contextmanager to always print the profile information,
even when exiting due to an exception.
In particular, this fixes the behavior so that we report profiling information
even if a slow command is interrupted with Ctrl-C. This also matches the
behavior of the upstream statprof profiler.