[MPS] Enable caching for random ops with Philox engine (#85833)
Also Fix type cast issue in Bernoulli (Fixes #85611)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85833
Approved by: https://github.com/kulinseth, https://github.com/malfet