Move parent static check in cc.Module.DepIsInSameApex into tag

In order to prepare for splitting DepIsInSameApex so it can be called
separately on the outgoing and incoming modules during a transtion,
add fromStatic to libraryDependencyTag so that the check doesn't need
to access both the parent and the child module.

This also fixes cases where the static parent was misdetected, which
causes a single test failure that seems correct, TestApexWithTests.
cc.Module.DepIsInSameApex correctly identifies that the "mytest" module
is static and the "mylib" shared library dependency is not used in
the apex.  Fix the test to make "mytest" non-static so that "mylib" is
included.

Bug: 372543712
Test: all Soong tests pass
Change-Id: Ibb0cfff77adefb804ff6c66467ac761b723597de
diff --git a/rust/rust.go b/rust/rust.go
index eeb228c..1417c08 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -1683,7 +1683,7 @@
 	}
 
 	for _, lib := range deps.SharedLibs {
-		depTag := cc.SharedDepTag()
+		depTag := cc.SharedDepTag(mod.Static())
 		name, version := cc.StubsLibNameAndVersion(lib)
 
 		variations := []blueprint.Variation{