Allow common.Glob to be called by singletons

Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either.  Also
move ExpandSources and Glob into AndroidModuleContext.

Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
diff --git a/java/app.go b/java/app.go
index 869cfea..5f153cf 100644
--- a/java/app.go
+++ b/java/app.go
@@ -244,14 +244,14 @@
 	var aaptDeps []string
 	var hasResources bool
 	for _, d := range resourceDirs {
-		newDeps := common.Glob(ctx, filepath.Join(d, "**/*"), aaptIgnoreFilenames)
+		newDeps := ctx.Glob(filepath.Join(d, "**/*"), aaptIgnoreFilenames)
 		aaptDeps = append(aaptDeps, newDeps...)
 		if len(newDeps) > 0 {
 			hasResources = true
 		}
 	}
 	for _, d := range assetDirs {
-		newDeps := common.Glob(ctx, filepath.Join(d, "**/*"), aaptIgnoreFilenames)
+		newDeps := ctx.Glob(filepath.Join(d, "**/*"), aaptIgnoreFilenames)
 		aaptDeps = append(aaptDeps, newDeps...)
 	}