added delete / preserve methods

Added deleteLinesFromTop to delete n-lines from top of a window. Added
deleteSingleChar with an optional n for multiple characters. Added
callbakcPreservePosition to call a function while preserving cursor
position.
added a callback to change cursor positions. resolved two issues.
fixed bug involving delete

fixed bug where delete would delete the entire cmd window and then
cause an error