Move config into common and provide helper

Using ctx.Config().(Config) everywhere is a mouthful, and it is
inefficient to do the type assertion.  Put the Config interface into
the context, and provide an AConfig() to return the Config already
converted to the right type.

Change-Id: I301a1fd7d2a005580aabca7866a37c5d42ad8c69
diff --git a/common/paths.go b/common/paths.go
index b052fef..bcd6d8c 100644
--- a/common/paths.go
+++ b/common/paths.go
@@ -16,21 +16,18 @@
 
 import (
 	"path/filepath"
-
-	"github.com/google/blueprint"
 )
 
 // ModuleOutDir returns the path to the module-specific output directory.
 func ModuleOutDir(ctx AndroidModuleContext) string {
-	config := ctx.Config().(Config)
-	return filepath.Join(config.IntermediatesDir(), ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir())
+	return filepath.Join(ctx.AConfig().IntermediatesDir(),
+		ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir())
 }
 
 // ModuleSrcDir returns the path of the directory that all source file paths are
 // specified relative to.
-func ModuleSrcDir(ctx blueprint.ModuleContext) string {
-	config := ctx.Config().(Config)
-	return filepath.Join(config.SrcDir(), ctx.ModuleDir())
+func ModuleSrcDir(ctx AndroidModuleContext) string {
+	return filepath.Join(ctx.AConfig().SrcDir(), ctx.ModuleDir())
 }
 
 // ModuleBinDir returns the path to the module- and architecture-specific binary