Support `__rmod__` (#58476)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/58035.
This PR implements `torch.Tensor.__rmod__` and `torch.remainder(scalar, tensor)` for the compatibility with NumPy’s interface.
(cc: mruberry, rgommers, emcastillo, kmaehashi)
TODO:
- [x] Update `tensor_binary_op` in test/test_binary_ufuncs.py after https://github.com/pytorch/pytorch/issues/58216 is merged.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58476
Reviewed By: ngimel
Differential Revision: D28776810
Pulled By: mruberry
fbshipit-source-id: 74f8aea80f439ef2cc370333524e39971eeb7bf4