Ensure addWindow/relayoutWindow won't return stale controls

In some cases, these functions would early return. For example, the
client might try to relayout a window which has been removed. We need
to make sure outActiveControls doesn't contain stale controls in such
cases.

This CL also makes outActiveControls non-null.

Fix: 155857511
Test: atest --iterations 20 SessionLifecycleTest#
      testDatasetAuthResponseWhileAutofilledAppIsLifecycled
Change-Id: I88a316374faa24233eda8e13902c48ed19c871aa
2 files changed