is_set_to: unify TH/THC implmentation and genericize test_is_set_to. (#28422)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28422
The TH implementation had two differences:
1) It explicitly checked for null storages; this isn't supported anymore so can be removed.
2) It collapsed all empty tensors to the same shape for the purpose of checking. This was introduced to keep BC when we introduced N-dimensional empty tensors,
but since it's been quite a long time since we've had N-dimensional empty tensors and the CUDA implementation didn't support this, we should get rid of it.
Test Plan: Imported from OSS
Differential Revision: D18061916
Pulled By: gchanan
fbshipit-source-id: 1a54cf9ea4fcb35b358a9ab57f84eff059ff1e7b