Make ScriptModule.training an attribute instead of a parameter (#21078)
Summary:
Redo of #19587
](https://our.intern.facebook.com/intern/diff/15560540/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21078
Pulled By: driazati
Differential Revision: D15560540
fbshipit-source-id: f415775d87c163f93b3bbdd5f87c9ff73f58b049