`#pragma redefine_extname`: warn only if conflicting ID is at TU scope. (#188256)
As an example, this should keep warning:
```
static void foo();
```
because here, the identiifer `foo` won't be affected. In fact, it now
becomes (mostly) impossible to even declare anything later that would
get affected, thus the new definition is in active conflict with the
`#pragma`.
This however will not warn anymore:
```
namespace blargh {
static void foo();
}
```
Here the author definitely did not intend for the `#pragma` to be
matched, and as such, it is okay to not warn there.
Fixes cases where `#pragma redefine_extname` is used to intentionally
rename C names at global scope that are so common that they need
renaming to avoid linker side conflict with other compilation units,
such as `SHA256`, as any name common at outer scope is likely also
common in namespaces, classes, function locals, etc. and it would be
nice to be able to use the `#pragma redefine_extname` mechanism
specifically to create linker hygiene between compilation units even if
some of them actually also use the same name for their own thing in one
of those unambiguous scopes.
Warnings in the test case removed by the code change:
```
File .../clang/test/Sema/redefine_extname.cpp Line 30: #pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_nsfunc'
File .../clang/test/Sema/redefine_extname.cpp Line 32: #pragma redefine_extname is applicable to external C declarations only; not applied to variable 'foo_nsvar'
File .../clang/test/Sema/redefine_extname.cpp Line 44: #pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_classmethod'
File .../clang/test/Sema/redefine_extname.cpp Line 46: #pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_staticmethod'
File .../clang/test/Sema/redefine_extname.cpp Line 50: #pragma redefine_extname is applicable to external C declarations only; not applied to variable 'foo_staticmember'
File .../clang/test/Sema/redefine_extname.cpp Line 53: #pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_classmethod'
File .../clang/test/Sema/redefine_extname.cpp Line 54: #pragma redefine_extname is applicable to external C declarations only; not applied to function 'foo_staticmethod'
File .../clang/test/Sema/redefine_extname.cpp Line 55: #pragma redefine_extname is applicable to external C declarations only; not applied to variable 'foo_staticmember'
File .../clang/test/Sema/redefine_extname.cpp Line 99: #pragma redefine_extname is applicable to external C declarations only; not applied to variable 'foo_local'
File .../clang/test/Sema/redefine_extname.cpp Line 101: #pragma redefine_extname is applicable to external C declarations only; not applied to variable 'foo_staticlocal'
```
Addresses issue #187497.