Enable instantiating model with pretrained backbone weights
Author: amyeroberts
Pull request: yes

# What does this PR do?

At the moment, there's two ways backbone weights can be initialized in a model: 
* Pretrained weights that are already saved alongside the parent model's weights in a checkpoint
* Randomly initialized from config

However, the main use-case of backbones is to be able to leverage pretrained weights of a feature extractor which then feed features to the neck/head. It's therefore necessary to be able instantiate a new model e.g. a MaskFormer model with pretrained backbone weights and the rest of the weights randomly initialized. 

This PR adds a new function `load_backbone` which enables loading a backbone from either a backbone config or using the parent model's config which contains information about the backbone e.g. the checkpoint. 

To reduce the number of changes, this PR doesn't update the modeling code to use `load_backbone`. Once this PR is added and modeling code updated, it will be possible to load backbones in a variety of ways:

Initialize a new MaskFormerModel with a pretrained resnet backbone
```py
from transformers import MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

config = MaskFormerConfig(backbone="microsoft/resnet50", use_pretrained_backbone=True)
model = MaskFormerForInstanceSegmentation(config)
```

Initialize a new MaskFormerModel with a randomly initalized resnet backbone
```py
from transformers import MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig

config = MaskFormerConfig(backbone="microsoft/resnet50", use_pretrained_backbone=False)
model = MaskFormerForInstanceSegmentation(config)
```

Initialize a new MaskFormerModel with a backbone config
```py
backbone_config = ResNetConfig()
config = MaskFormerConfig(backbone_config=backbone_config)
model = MaskFormerForInstanceSegmentation(config)
```


## 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 docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_28214). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

cc @NielsRogge 

As an update - when running slow tests for DETR, the instantiated model fails on the integration tests: output logits are similar, but not exactly the same. Digging into it 🕵️ 

Good news- failures were just an artefact of running on the ubuntu machine (they fail running on main too). Running on my mac, everything's good. Just one test value had a 6th decimal place change. Updated in  [06ff4f6](https://github.com/huggingface/transformers/pull/28214/commits/06ff4f66ad618e033a4b2d0925b9924649c3f39c). 

@ArthurZucker Only outstanding thing to address is for [this comment](https://github.com/huggingface/transformers/pull/28214#discussion_r1440543327). I've added tests in `test_load_backbone_in_new_model` to include checking loading with a timm backbone too. Is there anything else you'd like me to add / cover? 

Currently failing tests are flaky. Opened a PR #28458 to address