[jit] Add missing tensor properties (#33906)
Summary:
Fixes #30775
This adds TorchScript implementations (copied from `python_variable.cpp`) for the remainin `Tensor` properties that were missing from the jit, in addition to a test that ensures new properties will trigger a failure so we can decide whether we want to add them as well.
For `some_tensor`, adds:
* `some_tensor.T`
* `some_tensor.ndim`
* `some_tensor.is_leaf`
* `some_tensor.name`
](https://our.intern.facebook.com/intern/diff/20153288/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33906
Pulled By: driazati
Differential Revision: D20153288
fbshipit-source-id: 2ddc48a14267077bc176065267e5ce52181b3d6b