[PyTorch] Add NestedTensor support functions for transformers
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75491
Here are the NestedTensor kernels we'll need for the improved transformer implementation.
Differential Revision: [D35409275](https://our.internmc.facebook.com/intern/diff/D35409275/)
**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D35409275/)!
Approved by: https://github.com/cpuhrsch