Fixed issue with not been able to dock task from recents after reboot

- Always set the docked stack mode when starting a task from recents
even if the task is already in the docked stack. The caller might want
to change the docked stack location.
- Return last persisted bounds for task that hasn't be restored into a
stack yet when AMS.getTaskBounds is called.
- Make sure there is a valid top activity when moving a task to a stack
before trying to preserve the window.

Bug: 25590206
Change-Id: Id115fc62c28913f999c62cdbbaccd887daa0fab5
3 files changed