port `index_fill_` from TH to ATen. (#50578)
Summary:
As per title. The port is based on TensorIterator.
Supports complex input.
Resolves https://github.com/pytorch/pytorch/issues/24714.
Resolves https://github.com/pytorch/pytorch/issues/24577.
Resolves https://github.com/pytorch/pytorch/issues/36328.
Possibly resolves https://github.com/pytorch/pytorch/issues/48230
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50578
Reviewed By: ngimel
Differential Revision: D26049539
Pulled By: anjali411
fbshipit-source-id: 2be4e78f7a01700c593a9e893e01f69191e51ab1