Add option to resize like torchvision's Resize
# What does this PR do?

A lot of research papers (like ConvNeXT, PoolFormer, etc.) use [`torchvision.transforms.Resize`](https://pytorch.org/vision/stable/transforms.html#torchvision.transforms.Resize) when preparing images for the model. This class supports providing an integer size, which will only resize the smaller edge of the image.

The `resize` method defined in `image_utils.py` currently resizes to (size, size) in case size is an integer. This PR adds the possibility to resize images similar to torchvision's resize by adding an argument `torch_resize` (which is set to `False` by default). One can then also provide an optional `max_size` argument.

This is replicated using Pillow.
_The documentation is not available anymore as the PR was closed or merged._<|||||>Applied all suggestions from your review, I've renamed `torch_resize` (which defaults to `False`) to `default_to_square` (which defaults to `True`).

I guess we cannot default it to a rectangle, to be backwards compatible? Or can we, if we change the existing ones that expect a square to `default_to_square=True`)? Based on [this](https://github.com/huggingface/transformers/search?q=self.resize), it seems like we currently have 10 models using the resize method that assume providing an integer will resize to a square.<|||||>>  I guess we cannot default it to a rectangle, to be backwards compatible? Or can we, if we change the existing ones that expect a square to default_to_square=True)? Based on this, it seems like we currently have 10 models using the resize method that assume providing an integer will resize to a square.

We can switch the other way, but only if we change the default for all the subclasses that expected the resize to a square, so not sure it's worth the hassle.