[WIP] part 2 of the big error reporting refactoring

This is the easy part. Would like to have them go green already.
I won't rebase this part of the branch except for fixing unexpected test suite breakage.