Add EnableTorchFunction (#82647)
If you DisableTorchFunction, as is done in the default __torch_function__
implementation, if you want to reentrantly use TorchFunction (e.g., to
trace FX proxies), you have to be able to turn it back on.
enable_reentrant_dispatch does not work in this case because by the time
we snapshot TLS, torch function is already disabled.
Differential Revision: [D38354504](https://our.internmc.facebook.com/intern/diff/D38354504/)
**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D38354504/)!
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82647
Approved by: https://github.com/zou3519, https://github.com/albanD