Allow existing configs to be registered
# What does this PR do?

If a model has a class defined both on the Hub and locally, there is a clash appearing when loading it in the auto API and `trust_remote_code=True` coming from [this line](https://github.com/huggingface/transformers/blob/253d43d46d1291633fb21116b737f2bd8799d3da/src/transformers/models/auto/auto_factory.py#L421). This PR fixes it.
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_24760). All of your documentation changes will be reflected on that endpoint.