[MPS] Move max_pool2d to mps dispatch key (#90772)
Related issue: #77394
This PR also modifies some assertions in the codegen, an explanatory comment for it has been added.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90772
Approved by: https://github.com/albanD