[PyTorch][easy] Use copy-and-move instead of copy-and-swap in IValue::operator= (#65826)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65826
Should be marginally more efficient.
ghstack-source-id: 139315050
Test Plan: CI
Reviewed By: ezyang
Differential Revision: D31272489
fbshipit-source-id: 7c309d67a0ec0ada35a5b62497bac374538394a9