Allow FetchOne to retry the failed ref only

FetchOne may contain more than one ref to be fetched: the failure
of one of them could block the whole set of fetches, causing an
unwanted replication delay.

Enable the possibility for a FetchOne to partially complete,
leaving a leftover of failed refs that can be rescheduled and
retried individually.

This new behaviour has the immediate advantage of not delaying
the replication of refs that have no replication issues and still
assures that the failed replication events are going to be
rescheduled for retry, if the cause of the failure was not a
permanent exception.

Also fix the raising of the correct exception when executing
FetchOne with a CGit backend.

Tested E2E using CGit and JGit and aggregating a valid ref
and a non-existent one: the valid gets replicated and the invalid
is detected and traced.

Bug: Issue 16742
Change-Id: I093ce3a780313ada18323af7aaca391791b93441
8 files changed