Do not try to restore a task id if it does not exist.

Previously, we were trying to restore the recent task regardless of
if it was found in recents or a stack. This would lead to
referencing a null object later.

Change-Id: I014a751d3254ad267c32ac0b54783b31b8d17e93
Test: bit FrameworksServicesTests:com.android.server.am.ActivityStackSupervisorTests
Fixes: 36688598
2 files changed