Add yacc and lex support

Add support for yacc (.y or .yy) and lex (.l or .ll) files.  Also
tweak locations of .o files for normal and generated sources to
makes sure they don't collide.

Change-Id: I03172cddbdc022525bf392a81d72050406b8cdb3
diff --git a/common/paths.go b/common/paths.go
index abe67bf..b052fef 100644
--- a/common/paths.go
+++ b/common/paths.go
@@ -22,7 +22,8 @@
 
 // ModuleOutDir returns the path to the module-specific output directory.
 func ModuleOutDir(ctx AndroidModuleContext) string {
-	return filepath.Join(".intermediates", ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir())
+	config := ctx.Config().(Config)
+	return filepath.Join(config.IntermediatesDir(), ctx.ModuleDir(), ctx.ModuleName(), ctx.ModuleSubDir())
 }
 
 // ModuleSrcDir returns the path of the directory that all source file paths are