add tensor.to to script (#15976)
Summary:
Previously it only worked with keyword arguments. Now it is fully compatible.
Fix for: https://github.com/pytorch/pytorch/issues/15478
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15976
Differential Revision: D13643979
Pulled By: eellison
fbshipit-source-id: 6a47bce7db362da80452adffebd2732f8e62a240