Remove ModuleSrcPath

ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file.  In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.

Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.

Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.

Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
diff --git a/java/java_resources.go b/java/java_resources.go
index 6c1fd39..4622963 100644
--- a/java/java_resources.go
+++ b/java/java_resources.go
@@ -39,10 +39,10 @@
 	var excludeFiles []string
 
 	for _, exclude := range excludeResourceDirs {
-		dirs := ctx.Glob(android.PathForModuleSrc(ctx).Join(ctx, exclude).String(), nil)
+		dirs := ctx.Glob(android.PathForSource(ctx, ctx.ModuleDir()).Join(ctx, exclude).String(), nil)
 		for _, dir := range dirs {
 			excludeDirs = append(excludeDirs, dir.String())
-			excludeFiles = append(excludeFiles, dir.(android.ModuleSrcPath).Join(ctx, "**/*").String())
+			excludeFiles = append(excludeFiles, dir.(android.SourcePath).Join(ctx, "**/*").String())
 		}
 	}
 
@@ -52,7 +52,7 @@
 
 	for _, resourceDir := range resourceDirs {
 		// resourceDir may be a glob, resolve it first
-		dirs := ctx.Glob(android.PathForModuleSrc(ctx).Join(ctx, resourceDir).String(), excludeDirs)
+		dirs := ctx.Glob(android.PathForSource(ctx, ctx.ModuleDir()).Join(ctx, resourceDir).String(), excludeDirs)
 		for _, dir := range dirs {
 			files := ctx.GlobFiles(filepath.Join(dir.String(), "**/*"), excludeFiles)