perfetto: Keep a ring buffer of traces per-app

Use the property 'iorapd.perfetto.max_traces' to determine how many
maximum traces there should be per-app. Excess traces are deleted
from disk and db.

In addition, associate each new perfetto_trace.pb in the raw_traces
table with the app_launch_histories table.

Bug: 141378186
Test: manual
Change-Id: I4e9d2e01cf5ac1360c55de5bf65c554fb865fa4c
6 files changed