Fix no #onUserLeaving() when top activity paused

#onUserLeaving() was not called on the pausing activity, so the
activity did not enter pip. This is a regression from 3befe55
that the activities were resumed from leaf tasks. Since there are
two level tasks in split-screen mode, so the leaf task is always
not equals to the root task.

Bug: 176989982
Test: atest TaskTests
Change-Id: Ic20cf5f6e87b479b142933aae415b4f45097d1d1
1 file changed