add dtype checks for scatter/gather family of functions. (#38646)
Summary:
Adds additional dtype checks for scatter/gather family of functions, namely:
1. Checks whether `index` is of type `Long`
2. Checks whether `src.dtype == self.dtype`.
Fixes [https://github.com/pytorch/pytorch/issues/38554](https://github.com/pytorch/pytorch/issues/38554)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38646
Differential Revision: D21883033
Pulled By: gchanan
fbshipit-source-id: 4bbd48ec0706ddb002318742edba640871ec0162