Error out if legacy Tensor.new is called on alternate layouts / dtypes (#31485)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31485
Fixes: https://github.com/pytorch/pytorch/issues/22158
Test Plan: Imported from OSS
Differential Revision: D19196499
Pulled By: gchanan
fbshipit-source-id: a01ea7641b5fcd00a9d267243539ff64a5492e5f