Add Merging Logic to Jank Processor

This change will take JankStats that are collected from outside the
platform and merge them into the list of pending stats. When a stat is
being merged, it will either be merged into an existing stat that is
currently waiting to be logged or create a net new stat. The
determination to merge into an existing stat or create a new one is
based off of a key which is a concatenated string of widget category,
widget id and widget state.

Bug: 377572463
Flag: android.app.jank.detailed_app_jank_metrics_api
Test: atest CoreAppJankTestCases
Change-Id: I15b261076107cf7192652eabaf037da46a750d12
5 files changed