Expose a torch.result_type and simplify tensor iterator
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/26012
Test Plan: Imported from OSS
Differential Revision: D17556197
Pulled By: nairbv
fbshipit-source-id: c0be3ac9e99fecc26a181e301defc1942bc6708c