widget: Fix a rare display update problem after a terminal reset

https://bugzilla.gnome.org/show_bug.cgi?id=730599
(cherry picked from commit 8fbb9722099fa4af01cfb16919fe61282a7aa9ab)
widget: Speed up scrolling in very large terminals

https://bugzilla.gnome.org/show_bug.cgi?id=730732
(cherry picked from commit b8db6a28b9b809a643268941a3bd1b0dcff70198)