Generate: `TextIteratorStreamer` (streamer for gradio)
# What does this PR do?

Following the previous streamer PR (#22449), this PR adds a streamer that can be used as an iterator. If we want to use the iterator while generate is running, they must be on separate threads (naturally).

The interface looks quite simple, as can be seen in the documentation 🤗 The only kink is the need to call generation on a separate thread, but there is no great way around it (at most we can design an `if` branch inside generate where, if a streamer is used, generate is called in a separate thread... but that seems overkill for now).

A Gradio demo running on this branch can be seen [here](https://huggingface.co/spaces/joaogante/chatbot_transformers_streaming). There is pretty much no slowdown compared to a non-streamer call.

Inspired by @oobabooga's work (see [this comment](https://github.com/huggingface/transformers/pull/22449#issuecomment-1491311486)).
_The documentation is not available anymore as the PR was closed or merged._