Port atan from TH to ATen (#37991)
Summary:
Fixed https://github.com/pytorch/pytorch/issues/24538
Related https://github.com/pytorch/pytorch/issues/24507
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37991
Differential Revision: D21531741
Pulled By: VitalyFedyunin
fbshipit-source-id: c762cc80416d7fffbb1769c6cc5e0914ceaa8e2d