introduce `logger.warning_once` and use it for grad checkpointing code
This PR:

1. introduces a new `warning_once` logger method - to prevent repeating the same warning more than once
2. use it for gradient_checkpointing functionality - where one would get thousands of these warnings at the moment should they have `use_cache==True` - the other solution is to assert

(I did this for m4, so thought to sync here as well)

The rename was done automatically with:
```
perl -0777 -pi -e 's|(logger.warning)(\(\W+\S\Suse_cache=True)|logger.warning_once$2|msg' src/transformers/models/*/mode*py
```
_The documentation is not available anymore as the PR was closed or merged._