tsm: screen: implement selection support
This implements UI selection for the console buffer. This selection is not
to be confused with PTY application selection provided by the
mouse-protocol via VT200 protocol.
Instead, this selection allows UIs to tell the TSM layer to select a
special part of the screen. Moreover, it allows selections to go into the
scrollback-buffer and to be bigger than a single screen. The UI can even
implement scrolling during selection to allow arbitrarily big selections.
There might still be some special cases where we need to fix selection.
However, it already works pretty well.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>