[MPS] Fix `index_select` for empty input (#94117)
Also add test for this case to `test_index_select`
Fixes https://github.com/pytorch/pytorch/issues/93877
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94117
Approved by: https://github.com/orionr