traced_perf: make read period configurable

Additionally:
* shuffle validation / defaulting of config values into EventConfig.
* make the per-tick sample guardrail calculation based on the expected
  ratio of sampling and reading frequencies.

Bug: 144281346
Change-Id: I785495e7b3249aa74f3d2160e3c400c98f59447c
diff --git a/Android.bp b/Android.bp
index 7c7278f..19ea519 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5948,6 +5948,7 @@
 filegroup {
   name: "perfetto_src_profiling_perf_producer",
   srcs: [
+    "src/profiling/perf/event_config.cc",
     "src/profiling/perf/event_reader.cc",
     "src/profiling/perf/perf_producer.cc",
   ],