Don't call _jit_pass_onnx_function_extraction if export_modules_as_functions is False (#69742)
* fix clang-format violations
* Don't call _jit_pass_onnx_function_extraction if export_modules_as_functions is False
It's just wasteful.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73100