Reuse factory methods for art extensions of cc module types

Previously, art created its own module types by using lower level
methods in cc such as cc.NewLibrary(...) and module.Init(), essentially
duplicating the contents of factory methods like cc.LibraryFactory().
As a result when additional functionality was added to those factory
methods (e.g. sdk member support) the art module types did not benefit.

This changes switches the art soong types to use the factory methods
instead, removing the duplicated code and allowing them to be used as
sdk members.

Test: m checkbuild
Change-Id: Ib12fe2e776c948c2b56f993562b8165fd867ab9b
diff --git a/build/art.go b/build/art.go
index f3b29bb..5a09be0 100644
--- a/build/art.go
+++ b/build/art.go
@@ -388,8 +388,7 @@
 }
 
 func artLibrary() android.Module {
-	m, _ := cc.NewLibrary(android.HostAndDeviceSupported)
-	module := m.Init()
+	module := cc.LibraryFactory()
 
 	installCodegenCustomizer(module, staticAndSharedLibrary)
 
@@ -397,9 +396,7 @@
 }
 
 func artStaticLibrary() android.Module {
-	m, library := cc.NewLibrary(android.HostAndDeviceSupported)
-	library.BuildOnlyStatic()
-	module := m.Init()
+	module := cc.LibraryStaticFactory()
 
 	installCodegenCustomizer(module, staticLibrary)
 
@@ -407,8 +404,7 @@
 }
 
 func artBinary() android.Module {
-	binary, _ := cc.NewBinary(android.HostAndDeviceSupported)
-	module := binary.Init()
+	module := cc.BinaryFactory()
 
 	android.AddLoadHook(module, customLinker)
 	android.AddLoadHook(module, prefer32Bit)
@@ -416,8 +412,7 @@
 }
 
 func artTest() android.Module {
-	test := cc.NewTest(android.HostAndDeviceSupported)
-	module := test.Init()
+	module := cc.TestFactory()
 
 	installCodegenCustomizer(module, binary)
 
@@ -428,8 +423,7 @@
 }
 
 func artTestLibrary() android.Module {
-	test := cc.NewTestLibrary(android.HostAndDeviceSupported)
-	module := test.Init()
+	module := cc.TestLibraryFactory()
 
 	installCodegenCustomizer(module, staticAndSharedLibrary)