[PyTorch] Replace IValue::intrusive_ptr with IValue::isIntrusivePtr()
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76425
This tidies up an extra piece of state that was computable from the other state in IValue.
Differential Revision: [D31290017](https://our.internmc.facebook.com/intern/diff/D31290017/)
Approved by: https://github.com/ezyang