introduce TensorBase::mutable_data_ptr() (#98163)
See D44409928 for motivation.
Note that we keep the const-ness of the existing data_ptr() member so
that we don't have to change all references atomically. We just change
the ones here that we have higher confidence with.
Differential Revision: [D44611466](https://our.internmc.facebook.com/intern/diff/D44611466/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98163
Approved by: https://github.com/ezyang