Use new cursor from TextBlockPainter

This commit wires in the cursor to the actual text painting. It also cleans up
a lot of the cursor painting logic and fixes small issues that I found with it
along the way.