MaskFormer - enable return_dict in order to compile
# What does this PR do?

Is was previously not possible to use `torch.compile` on Maskformer as some modules always returned a dataclass, instead of a tuple. 

This PR adds a `return_dict` argument to these modules, which defaults to `True` to maintain the previous behaviour. 

Tested with:
```python
import requests

import torch
from PIL import Image

from transformers import AutoImageProcessor,AutoModelForInstanceSegmentation

checkpoint = "facebook/maskformer-swin-base-ade"
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained(checkpoint)
model = AutoModelForInstanceSegmentation.from_pretrained(checkpoint).to("cuda")
processed_input = processor([image, image], return_tensors='pt').to(device="cuda")

compiled_model = torch.compile(model, fullgraph=True)

with torch.no_grad():
    compiled_model(**processed_input, return_dict=False)
```



## 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).
- [ ] Did you write any new necessary tests?

_The documentation is not available anymore as the PR was closed or merged._<|||||>cc @merveenoyan who highlighted the compiling issue 🙏 <|||||>@sgugger Yep! I'll update that<|||||>@sgugger Most of the custom tests aren't easy to remove, unfortunately. As MaskFormer combines hidden states from different modules -- encoder, transformer decoder and pixel module decoder -- which are defined in nested arguments in the config e.g. `model.config.decoder_config.num_hidden_layers` it breaks a lot of assumptions. 

I've removed `test_training` and made `_prepare_for_class` and `test_output_attentions` match the common equivalent. I've also updated some of the config values to make sure they're small by default. <|||||>Thanks a lot!<|||||>Also, I wasn't able to enable the FX tests. There's an issue when the model is symbolically traced, where the output shapes are slightly different (off by one). Checking the outputs from the compiled model using `torch.compile` this doesn't occur, so I'm leaving this for a future PR :) 