[AutoModel] Add AutoModelForTextEncoding
# What does this PR do?

Adds AutoModel for text encoding (used in the circumstance when you want to extract the text encoder from an encoder-decoder architecture).

This facilitates loading a t5 encoder from t5 enc-dec model weights (as is done in Music Gen in #24109)
_The documentation is not available anymore as the PR was closed or merged._