[primTorch] Redefine prim.collapse{,_view} end point to be inclusive (#92017)
This makes `prims.collapse(a, start, end)` match the behavior of
`torch.flatten(a, start, end)` more closely.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92017
Approved by: https://github.com/mruberry