Introducing phased profiling framework.

TrackingSynchronizer can send a "phase completed" message to all processes. Their ThreadData's make a snapshot of task deaths and store it in a static map, associating with the number of the completed phase. They also clean the death data.

When requested to return a tasks snapshot, ThreadData returns that saved map, adding a snapshot of current task deaths as a separate "current" phase.

The rest of code was transformed to work with the map of snapshots instead of a single snapshot.

BUG=456354

Review URL: https://codereview.chromium.org/985773002

Cr-Commit-Position: refs/heads/master@{#323151}
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.h b/chrome/browser/metrics/chrome_metrics_service_client.h
index 4d436e9..7456d1d 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.h
+++ b/chrome/browser/metrics/chrome_metrics_service_client.h
@@ -97,8 +97,13 @@
 
   // TrackingSynchronizerObserver:
   void ReceivedProfilerData(
-      const tracked_objects::ProcessDataSnapshot& process_data,
-      int process_type) override;
+      const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase,
+      base::ProcessId process_id,
+      content::ProcessType process_type,
+      int profiling_phase,
+      base::TimeDelta phase_start,
+      base::TimeDelta phase_finish,
+      const metrics::ProfilerEvents& past_profiler_events) override;
   void FinishedReceivingProfilerData() override;
 
   // Callbacks for various stages of final log info collection. Do not call