porting gather to ATen using TensorIterator with multithreading support. (#32425)
Summary:
Fixes [https://github.com/pytorch/pytorch/issues/24702](https://github.com/pytorch/pytorch/issues/24702).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32425
Differential Revision: D19538265
Pulled By: ngimel
fbshipit-source-id: 78821a16b6948916e956a04f984e0956f86cf582