[Chapel Merge] Fix bug with not finding symbol imported in generi

Branch: refs/heads/master
Revision: 6e8e30d
Author: lydia-duncan
Log Message:

Merge pull request #16717 from lydia-duncan/genericImportBug

Fix bug with not finding symbol imported in generic function
[reviewed by @mppf]

It turns out that you can’t compare astr("") to itself - doing so caused
ImportStmts to fail to copy the unqualified and renaming lists, which meant
generic instantiations couldn’t utilize symbols brought in for unqualified
access via an import statement. Replace comparing to astr("") with comparing
the first letter to ‘\0’.

While here, I noticed that moving the new name when we notice the import is of
a symbol in a module was not using astr to replace it. Which isn’t that
important, since as I said earlier you can’t compare two astrs of “”. But it’s
good to have consistency so we don’t accidentally start failing to use astr on
something other than “”.

Resolves #16597
Resolves Cray/chapel-private#1441

Added three tests to lock in the change: one with the original bug (which
included importing from the Reflection module), one demonstrating that it
happened for any function imported, and one demonstrating that it did not
happen with an imported variable. All three of these tests work with this
PR.

Full paratest with futures passed

Modified Files:
A test/visibility/import/enablesUnqualified/callInGeneric.chpl
A test/visibility/import/enablesUnqualified/callInGeneric.good
A test/visibility/import/enablesUnqualified/callInGeneric2.chpl
A test/visibility/import/enablesUnqualified/callInGeneric2.good
A test/visibility/import/enablesUnqualified/varInGeneric.chpl
A test/visibility/import/enablesUnqualified/varInGeneric.good
M compiler/AST/ImportStmt.cpp

Compare: https://github.com/chapel-lang/chapel/compare/539c654f6d3b...6e8e30d60258