Add error codes to notes to allow ignoring them (#7429)
Associated note should have the same error code as the related
error, so that both will be ignored when the error is ignored.
Also make the default error code for notes to be 'misc', similar
to errors.
As a side effect, error codes for notes are now not shown. I
didn't find any notes which would benefit from having a specific
error code.
Fixes #7384.
Added tests for various notes, but they are not exhaustive.