Change PrivateUse1's resize_bytes to PrivateUse1HooksInterface (#117839)
Reopen from https://github.com/pytorch/pytorch/pull/117211
Modify the logic for entering the registration branch so that existing uts are not affected.
Co-authored-by: albanD <desmaison.alban@gmail.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/117839
Approved by: https://github.com/albanD