simpleperf: reduce file size generated by report_html.py.

Currently we generate a callgraph and reverse callgraph for each
function to show flamegraph for a function.
Instead, we can generate a callgraph and reverse callgraph for each
thread. To show flamegraph for a function, we can search all nodes
matching that function in the thread callgraph. This saves a lot
of data size.

Running `python report_html.py -i testdata/perf_with_interpreter_frames.data`,
current size of generated report.html is 7.8M, but new report.html size
after this patch is 3.9M.

Bug: 109943459
Test: run test.py.

Change-Id: I64f5e80931ed0ace3196bc6ba1ed5b7ea795ee44
2 files changed