Major clean up build files, use flags-per-feature.

These days we support an incredible number of build configurations:
- standalone (GN)
- in chromium (GN)
- in v8 (GN)
- in Fuchsia (GN)
- in Android (soong)
- in Google3
- amalgamated SDK


For each config we want to pick only some components of the
codebase. So far we've been carefully using intersections of
platform flags (e.g. build_standalone && !build_with_android)
but that has become unmaintainable.
This CL mainly introduces one flag per feature. Benefit:
1. All feature flags live in one place (perfetto.gni) and are
   easy to reason about.
2. All the GN conditions depend on these feature flags.

Test: manually rolled in chromium and v8 and looked
      at diff of .ninja files.
Bug: 132678367
Bug: 140126865
Change-Id: I36c4653f25751654c04ab257bdb7a0756269a813
diff --git a/src/android_internal/BUILD.gn b/src/android_internal/BUILD.gn
index d1bea0f..819532a 100644
--- a/src/android_internal/BUILD.gn
+++ b/src/android_internal/BUILD.gn
@@ -14,6 +14,15 @@
 
 import("../../gn/perfetto.gni")
 
+# This target is supported only in in-tree builds of Android. It contains
+# code that is not NDK-clean and references other repos in the Android tree.
+shared_library("libperfetto_android_internal") {
+  deps = [
+    ":android_internal",
+    "../../gn:default_deps",
+  ]
+}
+
 source_set("headers") {
   deps = [
     "../../gn:default_deps",
@@ -45,7 +54,7 @@
 # This target proxies calls to Android internal libraries that are not part of
 # the NDK. See README.md.
 source_set("android_internal") {
-  visibility = [ "//:libperfetto_android_internal" ]
+  visibility = [ ":libperfetto_android_internal" ]
   deps = [
     ":headers",
     "../../gn:default_deps",