Cap the maximum message queue size for reportActualWorkDuration

Currently, the queue size is only cleared when it gets sent, so if a
client calls the API fast enough it can overwhelm the duration buffer
before a batch is sent. This patch caps the maximum buffer size to
prevent this.

Bug: 406377213
Test: atest PerformanceHintNativeTestCases
Flag: EXEMPT BUGFIX
Change-Id: I288299636682644d118250339330be161262398f
4 files changed