widgets.diff: Save and restore selection across updates

git-cola's inotify integration causes it to automatically refresh itself
when files are changed by another process.

This can be problematic because refreshing the "diff" viewer causes it
to lose the user's selection.

Teach the "diff" viewer to save and restore the selection when its
contents change.  When no selection is present, restore the previous
cursor position.

Closes #155

Reported-by: Peter Júnoš <petoju@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>