Fix bug with reselecting text near old selection

Previously, with the "clear old selection" logic in the mouseup
handler, there were interesting interactions that could result
in newly-selected text not being highlighted, or the old highlight
not being cleared properly which resulted in newly-selected text
having part of the old highlight lingering.

By moving the "clear old selection" login into the mousedown
handler, all these bugs go away.