Update some torchscript tests after #24505
# What does this PR do?

Need to update the logic in some torchscript tests after #24505
_The documentation is not available anymore as the PR was closed or merged._<|||||>@sgugger Thanks for the suggestion. I actually copied from the common test file. However, there is 

```python
            model_buffers = list(model.buffers())
            for non_persistent_buffer in non_persistent_buffers.values():
                found_buffer = False
                for i, model_buffer in enumerate(model_buffers):
                    if torch.equal(non_persistent_buffer, model_buffer):
                        found_buffer = True
                        break

                self.assertTrue(found_buffer)
                model_buffers.pop(i)
```
there (which I didn't see when working on this PR). This uses the `values`.

So I am going to copy the above block (and therefore keeping using dict). Let me know if you have other opinions instead.<|||||>If you end up using the values, no worries.<|||||>Copy the mentioned block to all `_create_and_check_torchscript` definition.

Let's not change this by looking if the model use persistent or non-persistent buffuer: just keep the logic in the common test file.