Fix for issue #4: reported click count can be 0 under some situations 

Fixes for various selection issues
- selection doesn't properly update on firefox (issue #4) (commit #1)
- double & triple click-then-drag reset the selection boundaries to closest word or paragraph (commit #2 & 3)
- occasionally double-clicking near the cursor causes the expand-to-word boundaries logic to only select part of the word (commit #4)