Add inplace tests for several torch::nn modules / functionals (#35147)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35147
Test Plan: Imported from OSS
Differential Revision: D20578217
Pulled By: yf225
fbshipit-source-id: b8bafa49ee94c7dfbbca6e100ee3d9df5b2b621c