Fix always issuing generation deprecation warning (#43389)
Commit 38e5987 from PR #43194 introduced a minor bug that causes the issuing of
a deprecation warning regardless of the user using the deprecated interface.
For example:
```
model.generate(**input_ids, do_sample=False)
```
would issue a deprecation warning not to pass `GenerationConfig` as well as generation kwargs
even though we're not passing a `GenerationConfig`.
Along the fix this also introduces a unit test to check both the intended and the bug
behavior.
Co-authored-by: nemo <git@ningu.net>