Fix slow unhighlight issue, and improve highlighting a bit

Surrounded code that changes the textStorage attributes with beginEditing and endEditing to perform the changes in a single shot. Much faster unhighlighting and slightly better highlighting. fixes #32