Refactor html syntax highlighting and implement profiling
Edit Book: 2x speedup for inline spell checking. Useful if you are editing large HTML files (over 100KB in size).

Qt's text layout engine becomes very slow if we store arbitrary python
objects in QTextCharFormat classes. So refactor to not do that.