Fix showing duplicated recent tasks in Recents

New task was created while the recent task list frozen. So,
a new recent task was added, but the existing task with the
same affinity was not removed.

Removing the existing task and place the new task to the same
index in the list.

Bug: 192926123
Test: atest RecentTasksTest

Change-Id: I4392c30ab58cfdeebcc2d38c9c986ce531c2f507
2 files changed