introduce c10::DataPtr::mutable_get() and use it in c10 (#98217)
Differential Revision: [D44629940](https://our.internmc.facebook.com/intern/diff/D44629940/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98217
Approved by: https://github.com/ezyang