DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines

Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.