Add retry loop for BootImageProfileTest

In case the package manager is not yet started, retry saving the
profile up to 20 times to give it time. Should fix test flakiness.

Also addresses previous review comment.

Bug: 144048260
Bug: 139883463
Test: atest BootImageProfileTest

Change-Id: I12e101447d2a42fb0fcad7ad3427750c3ce89a79
1 file changed