Fix regression with font styles

This was already fixed with https://github.com/shoes/shoes4/commit/0f6ba294
but that got lost in the merging shuffle.

This also puts a closer test and check around what was fouling up the
TextBlockPainter test on the styling. The root cause was disagreement between
the stubbing length and text, which ended up returning odd results (different
ranges in the same single layout). We now test for and treat that more sanely.
Refactoring layout_ranges method

This method was getting a little long and hard to read, so I've broken the
various cases down into their own named sub-methods for setting each specific
case of range + layout combination up.