[wm] Add tests to check adjust bounds logic will always exit

In previous release, there was a scenario where the logic will result in
an infinite loop crashing the system. This change refactors the adjust
bounds logic to make it easier to test. Also adds a new test without any
candidate bounds and verifies it always returns.

Test: atest WmTests:TaskLaunchParamsModifierTests
Bug: 129491503

Change-Id: Iba94ade78cab154b823ae6ad5a6c3da198957715
2 files changed