Fix activity to task bugs

- Fix bug when task has been removed from mTaskHistory by
adding it back in at the top.
- Fix reparenting bug introduced by refactor of
resetTaskIfNeededLocked.

Change-Id: I93df2e62c6aed805fe888847dcf96a1fe0d7be26
2 files changed