Add prims::{real, imag}, refs::{real, imag}, remove prims::is_infinite (#80148)
This is a subset of https://github.com/pytorch/pytorch/pull/78655. I want to land this separately because the world is changing so fast, and https://github.com/pytorch/pytorch/pull/78655 is having lots of conflicts with other parts of the world.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80148
Approved by: https://github.com/mruberry