Update handleDeclNew to be more consistent with namespace handling

Additional namespace declaration do not come in as a canonical decl.
We also ought to support namespace not declared in the global scope
(i.e. nested namespace).

This reapplies commit 970720621087f2be0bf68477e4ab8da91f3e52e5
with additional comments.