Revert "Revert "Switch to use nested tensor by-default in Transformer… (#77924)
…Encoder (#77217)""
This reverts commit 0d6fa91d1ba93b423a31a7811b679a4770470363.
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77924
Approved by: https://github.com/atalman