Get a valid stack for reparenting activities when task reset

A new task was created for reparenting activities during task
reset, but not all types of stacks allowed to have multiple
tasks. If not, a new stack should also be created along with
the new task.

Bug: 122324373
Test: atest IntentTests
Change-Id: I470088bede8df0dbc6fe5ba7547adfd9697abeee
2 files changed