Implement alternate screen

Make it possible for Framebuffer to save and restore the current state
of the screen. get_DEC_mode() in terminalfunctions.cc also needs to be
patched to know the requested operation.

Signed-off-by: Barosl LEE <vcs@barosl.com>
Implement xterm mouse mode
Implement xterm extended mouse mode
xterm extended fix
Implement vt100 mouse mode (1000)
Alternate screen: only save cursor rather than full DrawState

Saving the DrawState is too much as it contains attributes which should
not be restored. For example, restoring mouse state makes the shell
receive mouse events when exiting vim.

Conflicts:
	src/terminal/terminalfunctions.cc