Extract utility classes from TraceMeRecorder.
Extract utility classes from TraceMeRecorder.
When improving Nvidia GPU profiling overhead, we found PerThread and EventQueue are common between TraceMe and the Gpu Tracer. So extract these two and move them into profiler/utils.
