Restore word & paragraph selection behaviour (double+triple click)

No longer using the browser's selection model means all the browser
behaviours need to be re-implemented in WebODF.