Improvements to text range line break handling. Tidy of class applier.

git-svn-id: http://rangy.googlecode.com/svn/trunk@796 88e730d5-b869-a254-3594-6732aba23865