Fix `serving_output` for TF composite models (encoder-decoder like models)
# What does this PR do?

**[If the concept is approved, I will apply the same changes to other TF encoder-decoder family of models]**

The composite models use its components' configurations. See for example

https://github.com/huggingface/transformers/blob/95e7057507c9eca8e997abb98645eee2621a5aea/src/transformers/modeling_tf_utils.py#L426-L430

However, in some places, our codebase still try to access some attributes at the top level of the configuration (i.e. not inside the 2 components), like

https://github.com/huggingface/transformers/blob/95e7057507c9eca8e997abb98645eee2621a5aea/src/transformers/models/vision_encoder_decoder/modeling_tf_vision_encoder_decoder.py#L664-L669

In particular, `self.config` may not have `use_cache`, for example, for this checkpoint `"nlpconnect/vit-gpt2-image-captioning"`. We should instead look  `self.config.deocder.use_cache`.

**This PR try to follow the rule of  ` # Encoder Decoder models delegate the application of the configuration options to their inner models. `.**

**This PR is also (another) one necessary step to fix #22731.**
_The documentation is not available anymore as the PR was closed or merged._