[MPS] Fix `cumsum` for negative indexes (#94119)
Use `wrap_dim` to get dim in range or range IndexError
Add test to test for that
Addresses feedback raised in https://github.com/pytorch/pytorch/pull/88319#issuecomment-1403541180
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94119
Approved by: https://github.com/Skylion007, https://github.com/seemethere