Adjust the stubs for PyCharm autocompletion of the Tensor methods.
With current stub information, PyCharm (maybe other tools too) is not able to offer a correct method auto-completion of `Tensor` object or type inference involving `Tensor`s in a method chain. It is the same for sub-classes such as `FloatTensor`.
For a workaround, I added `class Tensor` in the stub file and moved sub-class declarations. This allows much richer type inference results from PyCharm.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76712
Approved by: https://github.com/ezyang