Better error in the Auto API when a dep is missing
# What does this PR do?

As reported in #17266, the error message when an auto API is used to load a class that can't be loaded because a dep is missing is not helpful (it actually got worse since #17250).

This PR addresses the problem by returning the associated dummy class when the right class can't be loaded, which means the subsequent call to `from_pretrained` fails with a helpful error message. For instance, the sample given in #17266 will now error with:
```
ConvNextFeatureExtractor requires the PIL library but it was not found in your environment. You can install it with pip:
`pip install pillow`
```

Fixes #17266
_The documentation is not available anymore as the PR was closed or merged._