Update: retain cursor position after "unlink"

Closes #5.
It's worth leaving a comment to say why we do this, e.g. "we must save and then restore the selection because unwrapping the anchor loses the current selection".