[Profiler] Break metadata generation into multiple visitors (#83033)
This is a no-op change which establishes a base class to handle Result to Kineto details, and then splits the existing logging logic. (With the idea that at some point we'll probably conditionally run things to manage trace size.)
Differential Revision: [D38469409](https://our.internmc.facebook.com/intern/diff/D38469409/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83033
Approved by: https://github.com/aaronenyeshi