Do not accumulate replication events with retrying tasks

When a replication tasks is retrying is always discovered
in the search for pending tasks for a source URI. Adding more
work to a replication tasks that failed and is potentially
struggling is a bad idea.

1. If a replication task failed it means that there are
   temporary or persistent issues in completing the task.
   Adding more refs to the same failing replication task
   would put those refs into a future execution that may
   never succeed.

2. If the replication tasks was just too heavy and struggled
   to pass because of timeouts or bandwidth issues, adding
   yet another ref to fetch would put more burden to it
   and making the retries more likely to fail.

Avoiding to group with a retrying replication task may
add more latency because of the extra operation; however, it
would give more chances to succeed.

Bug: Issue 16789
Change-Id: Ifbe2939be69ad4e5d89e8a49402e9949a0956473
1 file changed