Refactoring and bug fixing beam search generate
This PR cleanes the beam_search decoding part of language generation. It simplifies the code and fixes a small bug for do_sample=True (see comments in code). 
It was also tested on all language generation slow tests.

### Future PR

- [x] Do the same change for TF 2.0 if ok -> #3148 
Good to merge for me