Prompt fixes in telnet handler

The previous prompt changes didn't work with telnet: it tried to incorrectly send text instead of prompt.
This fixes it with also some smaller things:

- update to comment
- don't send any empty msg text if none is provided (this make sure that there is no newline added after the prompt)
- change the order: if text is sent together with prompt, then send the text first followed by the prompt.