Refactor set_default_tensor_type to avoid legacy tensor types
For the purposes of this function, `PyTensorType` is essentially being
used as a `pair<Backend, ScalarType>` so it makes more sense to just
take these arguments directly. This simplifies the code and makes it
so that `py_set_default_dtype` doesn't need to search for a valid
`PyTensorType` object just to set the `ScalarType`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73369