Adjust the error messages to match the pattern "expected foo, found bar"

... which the coding style guide suggests.

This is a retry of PR #8314 which i screwed up in rebase-land.

@pcwalton: r?