Mark the global pipeline as unstable when new failures are found

The current behavior made the status of the global pipeline mostly
useless. It was introduced by 7bb4844547b580454848779d61f75e2c93ad3166
to not hide individual failure. However, individual failure are still
visible AND still less interesting because without the before information,
a failure can mean an existing failure.

Change-Id: I5c49e0f60289afe708bb7d6688575f698f30aa18
diff --git a/jenkins/lib/vars/reportAB.groovy b/jenkins/lib/vars/reportAB.groovy
index 4d3ed52..084c33e 100644
--- a/jenkins/lib/vars/reportAB.groovy
+++ b/jenkins/lib/vars/reportAB.groovy
@@ -75,5 +75,8 @@
       reportName: name
     ]
 
+    if (args.get("unstableOnNewFailure", true) && !jobs.failures.empty) {
+      currentBuild.result = "UNSTABLE"
+    }
   }
 }