First and buggy shot at implementing the alternative buffer mode properly.

Until now, alt buffer mode has been ignored and rendered inside the normal
line buffer terminal.