Refactor into tty_printf
Refactor into tty_newline and tty_setcol
Refactor into tty_moveup
tty_flush
Make tty_setcol 0-indexed
Avoid full clear before redraw

Instead of clearing the existing text before redrawing, clear as we draw
using tty_newline (CSI-K). This looks smoother when scrolling under
xterm and probably other terminals.
Simplify draw
Flush at end of clear