[Profiler] Clean up visit logic (#80822)
It's rather tedious to constantly have to specify `extra_fields_` in visit; especially since it tends to add a line. The `DEFINE_VISITOR` logic was also getting rather unwieldy and hard to read. Positional arguments in macros are quite bug prone. I think the new way is clearer.
Differential Revision: [D37481560](https://our.internmc.facebook.com/intern/diff/D37481560/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80822
Approved by: https://github.com/aaronenyeshi