[MPS] Cache multinomial_with_replacement graph (#86437)
Reuse existing RandomCachedGraph to keep RNG state as part of the graph
Add `CreateCachedGraphAs` convenience wrapper
Addresses https://github.com/pytorch/pytorch/pull/86342#pullrequestreview-1132197848
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86437
Approved by: https://github.com/kulinseth