factor globals into a buffer object
simplify redisplay. fix assumption that the display has exactly cols columns (now it may have more).
use ansi.goto with 0-based coordinates
place the pane anywhere
start fixing column computation
move editing functions into Buffer class
small refactor
refactor to Buffer.__init__
remove keycode display