Enabled cumsum and cumprod for bool tensors (#23346)
Summary:
```
a = torch.tensor([[True, False, True],
[False, False, False],
[True, True, True]])
>>> torch.cumsum(a, 0)
tensor([[1, 0, 1],
[1, 0, 1],
[2, 1, 2]])
>>> torch.cumsum(a, 1)
tensor([[1, 1, 2],
[0, 0, 0],
[1, 2, 3]])
```
Tested via unit tests.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23346
Differential Revision: D16469393
Pulled By: izdeby
fbshipit-source-id: b55f3ca0588f9961a771def40f6ef58932021e1a