Avoid UAF in media metrics service

Re-arranged several potential UAF accesses in the handling of saved
media.metrics items. Also avoids possible 'save and immediately
delete' behavior in certain queue situations.

Bug: 69002257
Test: watched dumpsys media.metrics
Change-Id: I8ab056f14d845aa27f3e65a77bc6c7dbfac24e4f
1 file changed