Delete as_variable_ref (#36096)
Summary:
This PR closes https://github.com/pytorch/pytorch/issues/34895 and builds on work started by ayushtues in https://github.com/pytorch/pytorch/pull/35184
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36096
Reviewed By: zou3519
Differential Revision: D20893693
Pulled By: astaff
fbshipit-source-id: 13aac1feaef3bcf86f7a4cf92d26e7a1ae43a3b3