Generate: Enable easier TextStreamer customization
# What does this PR do?

Minimally adapts recently integrated (https://github.com/huggingface/transformers/pull/22449) by adding a more obvious API hook for streaming tokens yet retains all the current semantics.

I am excited to use TextStreamer but I found the hook-in API not as intuitive as it could be if one needs to customize token printing. For example, I need to use specific colouring to print arriving tokens, yet achieving this without a complete TextStreamer rewrite is not as easy. We can easily create an obvious hook-in method:

```def on_new_token(self, token: str, stream_end: bool = False):```

This method is called by TextStreamer yet its subclasses can easily customize printing. The default implementation of on_new_token method simply prints tokens to stdout as it currently does. 

I don't foresee any major documentation updates as a consequence of this PR. 

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
@gante @sgugger 
_The documentation is not available anymore as the PR was closed or merged._<|||||>> I like the structure, but I dislike the name `on_new_token`. It's actually a callback on "new print-ready text". Perhaps `on_finalized_text`? WDYT?

@gante I am completely indifferent regarding the name. Please adjust the name as you like! 
On a second look, I'm also not 100% sure whether to put this method into TextStreamer only. Your call. <|||||>Let's keep it in `TextStreamer` for now. It's still early to tell how people will want to use it :)