Allow activities be reparented to same affinity task

Activities that have set allowTaskReparenting to true were
not reparented to the same affinity task while an activity
was started with RESET_TASK_IF_NEEDED flag.

Since the tasks are no longer placed in a single stack, we
now have to examine for all tasks across different displays
and stacks.

Bug: 143514008
Test: atest IntentTests
Change-Id: I3a6e552fe2f5bce6b0d0fa59fcf151178c88c537
3 files changed