[MPS][BE] Introduce MPSUnaryCachedGraph (#81033)
I.e. CachedGraph that has input and output tensors
Also, add `MPSGraphCache::LookUpAs` template, which combines LookUp with
static_cast to target type
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81033
Approved by: https://github.com/kulinseth