Implement (somewhat) intelligent updating of lines

Changes to text, widgets, classes, and gutter are now separated.

For individual line changes, the DOM is updated for only the change,
rather than doing a full redraw on the line.