MaskFormer, Mask2Former - replace einsum for tracing
# What does this PR do?

Maskformer cannot currently be traced because of einsum operations. This PR replaces the einsum operations with standard matmuls.  

With this PR, the following now runs: 

```python
import torch
from transformers import Mask2FormerForUniversalSegmentation

device = torch.device("cuda")
model = Mask2FormerForUniversalSegmentation.from_pretrained(
    "facebook/mask2former-swin-tiny-coco-instance",
    torchscript=True
).eval().to(device)
dummy_input = torch.randn((1,3,640,640)).to(device)
traced_model = torch.jit.trace(model, dummy_input)

with torch.no_grad():
    out = traced_model(torch.randn((2,3,640,640)).to(device))
    out = traced_model(torch.randn((2,3,640,640)).to(device))
```

Partially fixes #25261  - enables tracing but does not resolve the issue of different results between traced and non-traced model on GPU


## 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 docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_25297). All of your documentation changes will be reflected on that endpoint.