Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition. Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency. Fix compil warnings and some other compil issues.
Exclusions are currently persisted in the project file. Fixes https://gitlab.com/kicad/code/kicad/issues/1989