[TableGen] Factor out timer code into a new `TGTimer` class (#111054)Factor out the timer related functionality from `RecordKeeper` to a new `TGTimer` class in a new file.