Add unit tests to Core Lint
As far as I am aware, there are no unit tests for Lint.
This means that when refactoring the code, it's possible to accidentally disable or weaken a test, without getting any feedback.
For every error message in Lint, we should have a test that creates an invalid Core program (without going through desugarer) and checks that the error message is present.
Additionally, we should have similar tests for STG Lint and Cmm Lint. (This can be moved to a separate ticket.)