agent: Convert non-UTF8 with replacement char in CockpitTextStream

When we encounter non-UTF8 in text-stream channels, replace the bad
characters with the unicode replacement character U+FFFD. This
usually shows up as a diamond with a question mark in it in modern
fonts.

This allows us to not be so fragile with the text-stream channels,
and close unexpectedly.

The terminal stuff didn't really need this, because it seems that
terminal escape codes are all ASCII clean.
web: Show a usable terminal in container details

Show a usable terminal in container details, where you can type
see output, scroll, etc.

It's not perfect: there's no cursor, and disconnects when the
container stops. But other than that seems to work well.

For now we show the terminal when the docker container has a tty.
But this seems like the default. When no tty Docker's /attach
command uses a strange binary framing, which we can't handle on
our text-stream socket.