Add testSaveAndRestoreCursorAndCharset
Add terminalSetScrollRegionTop
Add tests for ED (erase in display) and fix bug where an extra char was erased in BEFORE mode