Restore proper order of error tokens

Error tokens come out reversed, so we must reverse them.
Fix error sorting stability

We must use a “less-than” predicate to maintain the stability of
sorting, and we need stable sorting to keep errors in the order of the
output of the corresponding syntax checker.
Fix test cases

We expect errors in the order as they appear in syntax checker output