Fix user cleanup in modern broadcast queue.

When a user is removed, we iterate through all
existing processes in that user and mark any pending
receivers as "skipped" but the way we are currently
iterating and removing the process queues at the same
time could result in skipping over some process queues.

Bug: 259529372
Bug: 260158381
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Change-Id: I3487756ca4c230d3a67fa2f85751aefeb055a66e
3 files changed