[PyTorch] Make NestedTensorImpl::get_nested_size_tensor() const
Differential Revision: [D34978318](https://our.internmc.facebook.com/intern/diff/D34978318/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74395
Approved by: https://github.com/cpuhrsch