Clean up tools
Factor out to trace_utils.py. And add trace_diff tool