Change some NSLog's into DLog's
Add support for CSI 3J, which erases scrollback history but leaves the screen alone. (Erase Saved Lines). Fixes bug 666.