Add Image Processors
Author: amyeroberts
Pull request: yes

# What does this PR do?

Adds image processors for most vision models in the transfomers library. CLIP for first review. Once it's had approval, I'll merge the other processors into this branch, ask for a final review and then merge if all good. Other models with more complex processing logic e.g. DETR will have subsequent PRs. 

**🚨🚨🚨 `size` parameter 🚨🚨🚨**
The most important change here is how `size` is  recorded in the configurations and passed around in the processing logic. 
* Some feature extractors' had `size` recorded as a tuple in `(width, height)` format, and others in `(height, width)` format.
* To remove ambiguity, any new configurations will have `size` as a dictionary
    -  `{"height": h, "width"}`
    - `{"shortest_edge": s}`: some feature extractors `size` indicates the length the shortest should be resized to
    - `{"shortest_edge": s, "longest_edge": l}`: same as above, but also places upper limit on the longest edge
* `get_size_dict` is a helper function to keep backwards compatibility with old configs. It takes old size arguments and converts them to the equivalent dict. This is applied at `__init__`, `preprocess` and any relevant transforms e.g. `resize` where old size arguments can be passed. 

Other models:
* [x] [BeiT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-beit)
* [x] [ConvNeXT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-convnext)
* [x] [DeiT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-deit)
* [x] [DPT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-dpt)
* [x] [Flava](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-flava)
* [x] [ImageGPT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-imagegpt)
* [x] [LayoutLM](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-layoutlm)
* [x] [LeViT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-levit)
* [x] [MobileViT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-mobilevit)
* [x] [Perceiver](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-perceiver)
* [x] [PoolFormer](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-poolformer)
* [x] [SegFormer](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-segformer)
* [x] [VideoMAE](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-videomae)
* [x] [Vilt](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-vilt)
* [x] [ViT](https://github.com/huggingface/transformers/compare/main...amyeroberts:transformers:add-image-processor-vit)

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?

Comments:
_The documentation is not available anymore as the PR was closed or merged._

@sgugger @LysandreJik @alaradirik @NielsRogge LMK if you'd rather I did this as many, separate feature extractor PRs for each model type, or as proposed in the description: CLIP as a demonstration, merging the other PRs into this one and then a final PR. 

> @sgugger @LysandreJik @alaradirik @NielsRogge LMK if you'd rather I did this as many, separate feature extractor PRs for each model type, or as proposed in the description: CLIP as a demonstration, merging the other PRs into this one and then a final PR.

@amyeroberts nice work :) I'm fine with reviewing all image processors in this PR. 

@sgugger @alaradirik @NielsRogge @LysandreJik - All of the other models image processors are now merged in and all tests passing. I've added a few comments highlighting some design decisions. 

@amyeroberts I get a 'cannot import name' error when I try to import XXXImageProcessor classes like this:
`from transformers import XXXImageProcessor`

Just wanted to double check if everything can be imported without any issues on your side?

> @amyeroberts I get a 'cannot import name' error when I try to import XXXImageProcessor classes like this:
from transformers import XXXImageProcessor
Just wanted to double check if everything can be imported without any issues on your side?

@alaradirik It's not possible (yet) to directly import the image processors. This PR makes an alias for the feature extractors, such that if you do `from transformers import XXXFeatureExtractor` it will import the equivalent image processor. Enabling these imports will come in a set of follow up PRs which will handling completely replacing the feature extractors and making the image processors the official objects to use. This will include: making image processors directly importable; adding the `AutoImageProcessor` class; updating & expanding image processor documentation; replacing feature_extractor with `image_processor` in examples. 

@alaradirik @NielsRogge Can you give a final review and let me know if we're good to merge?