Deprecate `__torch_function__` as instance method in C++
Ref #63767
This has already been deprecated in the python code for a long time,
but was never deprecated in the C++ api so it's possible users might
not have had sufficient warning yet.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74829
Approved by: https://github.com/ezyang