Revert "Switch to use nested tensor by-default in TransformerEncoder (#77217)"
This reverts commit 8cacb199ba34d63f9d186d0eac3798d6bab82a82.
Reverted https://github.com/pytorch/pytorch/pull/77217 on behalf of https://github.com/albanD due to please as it broke many tests: https://github.com/pytorch/pytorch/runs/6515962633?check_suite_focus=true