Add helper append_whitespace

Suggested viewing: git show -w
InHeadNoscript mode
Rework whitespace splitting in the tree builder

We have to do more than remove a prefix of whitespace.

I'm not very confident of the correctness of the interaction between whitespace
splitting, mode changes, and reconsumption.  I will test it more later.
Move and rename tree builder token preprocessing
Fix warnings in tree builder