Add and use staticLibrary()

Add staticLibrary() that returns true for a static variant of a
library, and replace all instances of foo.static() && !foo.staticBinary()
with foo.staticLibrary.

Test: builds
Change-Id: I0bf0c18669c24f23ebc9cc33d525b86d81e22d40
diff --git a/cc/afdo.go b/cc/afdo.go
index 14d105e..03dc271 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -163,7 +163,7 @@
 		}
 
 		// TODO(b/324141705): this is designed to prevent propagating AFDO from static libraries that have afdo: true set, but
-		//  it should be m.static() && !m.staticBinary() so that static binaries use AFDO variants of dependencies.
+		//  it should be m.staticLibrary() so that static binaries use AFDO variants of dependencies.
 		if m.static() {
 			return ""
 		}
@@ -188,7 +188,7 @@
 		if variation == "" {
 			// The empty variation is either a module that has enabled AFDO for itself, or the non-AFDO
 			// variant of a dependency.
-			if m.afdo.afdoEnabled() && !(m.static() && !m.staticBinary()) && !m.Host() {
+			if m.afdo.afdoEnabled() && !m.staticLibrary() && !m.Host() {
 				m.afdo.addDep(ctx, ctx.ModuleName())
 			}
 		} else {