[metrics] Add thread creation spam stats to android_task_names

First added an ANDROID_THREAD_CREATION_SPAM stdlib function to
find stats of rapidly created threads.

To support finding thread names where only some suffix changes,
e.g Thread-123, we aggreate the stats per process per thread prefix.
We currently use a STR_SPLIT workaround to find prefixes by splitting
thread names by some common delimiters. When we have perfetto REGEXP
support, we can replace this with a more robust solution.

Test: tools/diff_test_trace_processor.py out/android/trace_processor_shell
Change-Id: Idfc5b89be82a709d08577b066c2db7f4f213d1b6
diff --git a/Android.bp b/Android.bp
index 9e9630c..b269a43 100644
--- a/Android.bp
+++ b/Android.bp
@@ -10510,6 +10510,7 @@
         "src/trace_processor/perfetto_sql/stdlib/android/startup/internal_startups_minsdk33.sql",
         "src/trace_processor/perfetto_sql/stdlib/android/startup/startups.sql",
         "src/trace_processor/perfetto_sql/stdlib/android/statsd.sql",
+        "src/trace_processor/perfetto_sql/stdlib/android/thread.sql",
         "src/trace_processor/perfetto_sql/stdlib/chrome/chrome_scroll_janks.sql",
         "src/trace_processor/perfetto_sql/stdlib/chrome/chrome_scrolls.sql",
         "src/trace_processor/perfetto_sql/stdlib/chrome/cpu_powerups.sql",