Remove EarlyMutators and DynamicDependencies

EarlyMutators are identical to BottomUpMutators, except they run before
DynamicDependencies.  DynamicDependencies can be replaced with a
BottomUpMutator.  Replace both EarlyMutators and DynamicDependencies
with BottomUpMutators, which allows setting the order between all
mutators through registration order.

Change-Id: Id1305d798d3d2da592061c89d7c10a71780b71a3
diff --git a/common/arch.go b/common/arch.go
index 0594567..f0f4409 100644
--- a/common/arch.go
+++ b/common/arch.go
@@ -20,15 +20,13 @@
 	"runtime"
 	"strings"
 
-	"android/soong"
-
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 )
 
 func init() {
-	soong.RegisterEarlyMutator("host_or_device", HostOrDeviceMutator)
-	soong.RegisterEarlyMutator("arch", ArchMutator)
+	RegisterBottomUpMutator("host_or_device", HostOrDeviceMutator)
+	RegisterBottomUpMutator("arch", ArchMutator)
 }
 
 var (
@@ -303,7 +301,7 @@
 	}
 )
 
-func HostOrDeviceMutator(mctx blueprint.EarlyMutatorContext) {
+func HostOrDeviceMutator(mctx AndroidBottomUpMutatorContext) {
 	var module AndroidModule
 	var ok bool
 	if module, ok = mctx.Module().(AndroidModule); !ok {
@@ -335,7 +333,7 @@
 	}
 }
 
-func ArchMutator(mctx blueprint.EarlyMutatorContext) {
+func ArchMutator(mctx AndroidBottomUpMutatorContext) {
 	var module AndroidModule
 	var ok bool
 	if module, ok = mctx.Module().(AndroidModule); !ok {
@@ -426,7 +424,7 @@
 
 var dashToUnderscoreReplacer = strings.NewReplacer("-", "_")
 
-func (a *AndroidModuleBase) appendProperties(ctx blueprint.EarlyMutatorContext,
+func (a *AndroidModuleBase) appendProperties(ctx AndroidBottomUpMutatorContext,
 	dst, src interface{}, field, srcPrefix string) {
 
 	src = reflect.ValueOf(src).FieldByName(field).Elem().Interface()
@@ -459,7 +457,7 @@
 }
 
 // Rewrite the module's properties structs to contain arch-specific values.
-func (a *AndroidModuleBase) setArchProperties(ctx blueprint.EarlyMutatorContext) {
+func (a *AndroidModuleBase) setArchProperties(ctx AndroidBottomUpMutatorContext) {
 	arch := a.commonProperties.CompileArch
 	hod := a.commonProperties.CompileHostOrDevice