Validate args in HalfCauchy and HalfNormal (#50492)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/50404
Complementary to https://github.com/pytorch/pytorch/issues/50403
This also fixes `HalfCauchy.cdf()`, `HalfNormal.log_prob()`, `HalfNormal.cdf()` and ensures validation is not done twice.
cc feynmanliang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50492
Reviewed By: mrshenli
Differential Revision: D25909541
Pulled By: neerajprad
fbshipit-source-id: 35859633bf5c4fd20995182c599cbcaeb863cf29