Rewrite DumbLineBreaks

It handled long sequences of unbreakable tokens
(allowLineBreakBefore=false) wrong before, breaking them in between.

I also hope that I did a better job at documenting the code this time –
I couldn’t tell you what the last part of the old implementation did, it
just looked wrong to me.
Add a test for DumbLineBreaks