Try to make sure jobs will not get pushed twice on failures

* Some queues like the DB one, might split up batches into chunks
  which we do not want when used by federated queues (it already
  manages chunking anyway). If only X of Y got inserted, then they
  would all get inserted into another partition, causing duplicates

Change-Id: Id73b34f3500f8aeaf456e6bcac862a1e4832c870
(cherry picked from commit 917f915b4be2a4e54dc16d1eff47501344b75854)