Append compiler notes to the errors or warnings to which they belong.

When an error or warning is followed by a note that does not look like
"...note: in function foo..." (or "in top-level" etc.), the note is added
to the list of warnings or errors.