[res] Reduce allocations in OverlayManagerSettings

Don't collect all items into two lists when all that is needed
is just a loop over them, use a callback instead

Bug: 282215580
Test: build + boot + presubmits
Change-Id: Ie7025815caaa9e2dcbf4efeb0ee65c49e882d271
2 files changed