[ONNX] Improve diagnostics performance (#99936)
Summary
- Do not call `fx_graph_module.print_readable` when recording `fx.GraphModule` function argument diagnostics.
- Cache `inspect.getsourcelines` results.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99936
Approved by: https://github.com/justinchuby, https://github.com/abock