Add support for Perceiver ONNX export
Author: deutschmn
Pull request: yes

# What does this PR do?

As part of #16308, this PR adds support for exporting `Perceiver` to ONNX 🚀 

It introduces support for the following features:

- `masked-lm`, e.g. with `python -m transformers.onnx --feature=masked-lm --model=deepmind/language-perceiver export`
- `sequence-classification`, e.g. with `python -m transformers.onnx --feature=sequence-classification --model=deepmind/language-perceiver export`
- `image-classification`, e.g. with `python -m transformers.onnx --feature=image-classification --model=deepmind/vision-perceiver-conv export`

To achieve this, I made the following changes:
- Added `PerceiverOnnxConfig`.
- Changed parts of the modelling. The operations `.T`, `torch.broadcast_to` and `torch.moveaxis` aren't currently supported to be exported to ONNX by PyTorch, so I built some workarounds. 
- Changed the modality check in `onnx.__main__.py` since the model type `perceiver` can have either tokenizer or feature extractor, depending on the concrete model. (There might be a better way to achieve this than my try-except construction.)
- Added Perceiver to ONNX `FeaturesManager`.
- Added Perceiver to `test_onnx_v2.py`.

## Limitations

The `AutoModel` for Perceiver doesn't work without any preprocessors:

```python
model = AutoModel.from_pretrained("deepmind/language-perceiver")
tokenizer = AutoTokenizer.from_pretrained("deepmind/language-perceiver")

tokd = tokenizer("Rhubarb", return_tensors="pt")
tokd["inputs"] = tokd.pop("input_ids")
model(**tokd)
```

gives this error:
```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/Users/patrick/Projects/open-source/transformers/notebooks/perceiver-onnx.ipynb Cell 10' in <cell line: 6>()
      4 tokd = tokenizer("Rhubarb", return_tensors="pt")
      5 tokd["inputs"] = tokd.pop("input_ids")
----> 6 model(**tokd)

File ~/.pyenv-x86/versions/transformers-x86/lib/python3.9/site-packages/torch/nn/modules/module.py:1110, in Module._call_impl(self, *input, **kwargs)
   1106 # If we don't have any hooks, we want to skip the rest of the logic in
   1107 # this function, and just call forward.
   1108 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
   1109         or _global_forward_hooks or _global_forward_pre_hooks):
-> 1110     return forward_call(*input, **kwargs)
   1111 # Do not call functions when jit is used
   1112 full_backward_hooks, non_full_backward_hooks = [], []

File ~/Projects/open-source/transformers/src/transformers/models/perceiver/modeling_perceiver.py:866, in PerceiverModel.forward(self, inputs, attention_mask, subsampled_output_points, head_mask, output_attentions, output_hidden_states, return_dict)
    864     inputs_without_pos = None
    865     if inputs.size()[-1] != self.config.d_model:
--> 866         raise ValueError(
    867             f"Last dimension of the inputs: {inputs.size()[-1]} doesn't correspond to config.d_model: {self.config.d_model}. "
    868             "Make sure to set config.d_model appropriately."
    869         )
    871 batch_size, seq_length, _ = inputs.size()
    872 device = inputs.device

ValueError: Last dimension of the inputs: 9 doesn't correspond to config.d_model: 768. Make sure to set config.d_model appropriately.
```

An embedding is needed, which is implemented in [`PerceiverTextPreprocessor`](https://huggingface.co/docs/transformers/main/en/model_doc/perceiver#transformers.models.perceiver.modeling_perceiver.PerceiverTextPreprocessor), but not included in the default `PerceiverModel`. Therefore, the ONNX export in this PR doesn't include the `default` feature either.

## Before submitting
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [x] 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: #16308
- [x] 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? → Added model to `test_onnx_v2.py`.

## Who can review?

@lewtun @ChainYo Could you have a look? 🤗 
@NielsRogge I made some minor changes to your code in `modeling_perceiver.py`. Maybe you'd like to have a look too. 


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

Hi, @deutschmn this looks like a good start! :tada: 

Maybe the `preprocessor` check needs to be updated to fit other models' requirements.