Add in `model.generate` support to encoder outputs  for flax models
# 🚀 Feature request

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->
Add support to encoder outputs in `model.generate` for flax models (similar to Pytorch models).

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request
     related to a problem? e.g., I'm always frustrated when [...]. If this is related
     to another GitHub issue, please link here too. -->
With JAX, we need to pass a seed for each generation iteration. So when we want different samples, we may need to run the same function multiple times.

For Encoder/Decoder models such as Bart, we could calculate the encoder outputs once and then directly pass them to the decoder, which could potentially save half of the computations (when encoder/decoder have same size).

## Your contribution

<!-- Is there any way that you could help, e.g. by submitting a PR?
     Make sure to read the CONTRIBUTING.MD readme:
     https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md -->

Not sure the best way to implement it but it seems that they typically come from `model._prepare_encoder_decoder_kwargs_for_generation`

@patil-suraj @patrickvonplaten 
Hey @borisdayma, 

Aren't we already doing this here: https://github.com/huggingface/transformers/blob/b8810847d0576e3c142854ad3b8a607ecd3df291/src/transformers/generation_flax_utils.py#L140 ? <|||||>If you do:
```python
model.generate(…)
model.generate(…)  #same params
```

You will get twice a call to `model.encode(…)`.

You will call several times `model.generate(…)` if you want for example a bunch of predictions (dalle-mini case) and then sort them with another model (CLIP scoring).

In that case the encoder part does not depend on the key so we could cache it and allow passing it as an argument to `model.generate(encoder_outputs = manually_cached_value)`.

I think it's just about checking if `encoder_outputs` is part of `model_kwargs` in `_prepare_encoder_decoder_kwargs_for_generation`.<|||||>I see! Yeah you're right it should be as easy as this. We can add a `encoder_outputs` to the `generate()` function and then only call `encode()` if it's not present (that's what we're doing in PyTorch as well). Would you like to open a PR about it maybe? :-)