TF generate refactor - Beam Search
# What does this PR do?

As discussed in the original TF generate refactor plan (https://github.com/huggingface/transformers/pull/15562), adds `beam_search`. 

This Beam Search implementation was inspired by our FLAX implementation, which is XLA-friendly. However, this PR is not yet XLA-ready (😭). To pass existing tests, a few tweaks were added on top of the FLAX adaptation -- I added some comments in the PR to explain the differences (and why they were needed), hopefully making the review process easier. 

Tests ran (and passing):
- [x] GPT-2
- [x] T5
- [x] BART
- [x] Vision Encoder Decoder
- [x] Encoder Decoder
- [x] Speech to Text
- [x] RAG
_The documentation is not available anymore as the PR was closed or merged._<|||||>![image](https://user-images.githubusercontent.com/12240844/161332833-13b7c816-caa9-42c1-b9ed-5343354d2831.png)
