Fix CTRL `test_torchscrip_xxx` CI by updating `_create_and_check_torchscript`
# What does this PR do?

Fix CTRL `test_torchscrip_xxx` CI by updating `_create_and_check_torchscript`. Before calling `torch.jit.trace`, we run the prepared inputs first.

### More context

The PR #19681 puts `pos_encoding` attribute to the correct device for CTRL model, but this could be only done safely in the `forward` method.

However, our current `torchscript` tests don't run the model with the prepared inputs before calling `torch.jit.trace`. And so we get the following error for `CTRL` after PR #19678:
```bash
(line 535)  torch.jit._trace.TracingCheckError: Tracing failed sanity checks!
...
...
Comparison exception: 	The values for attribute 'device' do not match: cpu != cuda:0.
``` 
See [CI report](https://github.com/huggingface/transformers/actions/runs/3286486761/jobs/5414682626)


_The documentation is not available anymore as the PR was closed or merged._<|||||>Running all tests (per model separately, as in our CI) of `test_torchscript_xxx`, all pass