Fix multiple registration for redeclaration errors
Refactoring: Remove misleading that code processes both redeclaration and shadowing

NAME_SHADOWING is a warning so it has never been handled there
Tests for shadowing and redeclaration
Make tests reveal errors in number of diagnostics with the same type
Process each namespace only once while reporting redeclaration errors