Fix `nonlinearity` arg issue in RNN (#120234)
Fixes #114617
This PR fix the the issue with `nonlinearity`, so that it can be passed as arg or kwarg.
Alternatively, if making `nonlinearity` kwarg-only is preferred, I can revert to another commit. cc @mikaylagawarecki
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120234
Approved by: https://github.com/mikaylagawarecki