Fix CPU profiler tab time estimates (#8941)
Fixes https://github.com/flutter/devtools/issues/8870.
This fixes all views on the cpu profiler tab to take into account time where no code was executing (no samples taken).
The approach taken is to use the sampleCount * medianObservedSamplePeriod to get the total duration, which is then used in all the other calculations, instead of the total duration of the profile. This isn't necessarily perfect but should be much better than what we had before, and I don't know that we can do any better.
We use the median observed sample period because it is more accurate and reliable than the reported sample period.
For the reproduction case in the issue you now get this:
<img width="1247" alt="Screenshot 2025-02-26 at 2 21 13 PM" src="https://github.com/user-attachments/assets/aca32479-b6d0-4298-9bdb-7f25b4990a22" />
Instead of this:
<img width="1273" alt="Screenshot 2025-02-24 at 11 36 12 AM" src="https://github.com/user-attachments/assets/b106296c-07c4-4542-b85d-02a8105dba72" />