Fix activity manager timeout during shutdown

Flip the return value for ActivityStack.goToSleepIfPossible from true if
something needs to be done to true if the stack successfully went to
sleep. An incorrect check in ActivityStack.checkReadyForSleep was
causing ActivityStackSupervisor to sometimes not get notified when a
stack finished stopping during shutdown. Also, no-delay calls to
ActivityStackSupervisor#checkReadyForSleepLocked would fail to put
activities to sleep.

BUG: 64756886
Test: go/run-boottest
Change-Id: Icec590ed9a0e0f035881b7eb03a280787dcfced1
3 files changed