[Profiler] Expose extra fields to Python
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79623
Pybind11 has a really awesome feature where you can tell it how to move a type from C++ to Python just by specializing one template and it has out of the box support for variant types. (You do have to make one change to variant to avoid a bunch of chatty compiler warnings.) This will make it easy to both:
A) Write principled type driven analysis in Python similar to `c10::visit`
B) Expose fields that only make sense for certain events without cluttering up the API of the top level events.
For now I haven't added any fields; this PR is just to handle the foundation.
Differential Revision: [D36988611](https://our.internmc.facebook.com/intern/diff/D36988611/)
Approved by: https://github.com/aaronenyeshi