Ensure activity display with an empty stack can be released

The activities in home stack was destroyed/removed and resulted
in an empty home stack. Activity display was leaked due to it
had an empty home stack left which prevented it from being released.
Making sure activity display with an empty home stack can also
be released.

Also fixed an issue that home activity was not being resumed due
to early return in recursively resuming top activities.

Bug: 126747441
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I243fab507268f81df0a8067883157d63f0f79c22
2 files changed