[Refactoring] Distinguish internal AliasDeclarations for selective/renamed imports

Keep `AliasDeclaration::import` even after resolving forward refs.
Implement proper UFCS name look up

In basic, UFCS name search looks for only symbols in module scope.
If the enclosing scopes have local imports, the imported overload-set and
selected/renamed symbols should also be considered in searching.

In my opinion, UFCS should not see the locally declared symbols (in
statement scope and aggregate member scope). So, currently, this is a
final step for the UFCS implementation.
fix Issue 6185 - Include non-global functions when resolving UFCS
fix Issue 10004 - tuple comparison with side-effect should work
Merge pull request #1947 from 9rnsr/fix10004

Issue 10004 - tuple comparison with side-effect should work
Merge pull request #1930 from 9rnsr/new_ufcs

Implement proper UFCS name look up
Remove undefined behavior from test23.

The code tried to load 4 bytes from an 1-3 byte allocation.
LLVM's optimizer actually detects this, marking the entire
result undefined.