Fix some bugs with display iteration/removal ordering

There were loops whose body were removing elements during
loop iteration. This CL separates some of those to avoid
out-of-bounds errors.

Also fixes an issue where navbar was using a non-visual context.

Bug: 183993924
Test: atest MultiDisplaySystemDecorationTests
Change-Id: I90eb229e1739e18e2b9b9347212cc52c5b48c30e
5 files changed