Use Pratt's parser for expressions in text blocks

This one is ready for review for which I would be really grateful. The diff might look big but at the end of the day there are rather simple code changes and plenty of test changes.
Either the comment or the test is wrong here, to be clarified.