[PyTorch] add test for numel slow path affecting data_ptr (#100993)
This test would have stopped #98090 -- data_ptr needs to call custom Python numel if it exists, since it could be arbitrary Python.
Differential Revision: [D45701566](https://our.internmc.facebook.com/intern/diff/D45701566/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100993
Approved by: https://github.com/ezyang