MEDIUM: haproxy: don't use sync_poll_loop() anymore in the main loop

This partially reverts commit d8fd2af ("BUG/MEDIUM: threads: Use the sync
point to check active jobs and exit") which used to address an issue in
the way the sync point used to check for present threads, which was later
addressed by commit ddb6c16 ("BUG/MEDIUM: threads: Fix the exit condition
of the thread barrier"). Thus there is no need anymore to use the sync
point for exiting and we can completely remove this call in the main loop.
diff --git a/src/haproxy.c b/src/haproxy.c
index fcba6cd..5f56c0a 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -2385,24 +2385,6 @@
 	}
 }
 
-static int sync_poll_loop()
-{
-	int stop = 0;
-
-	if (THREAD_NO_SYNC())
-		return stop;
-
-	THREAD_ENTER_SYNC();
-
-	if (!THREAD_NEED_SYNC())
-		goto exit;
-
-  exit:
-	stop = (jobs == 0); /* stop when there's nothing left to do */
-	THREAD_EXIT_SYNC();
-	return stop;
-}
-
 /* Runs the polling loop */
 static void run_poll_loop()
 {
@@ -2421,10 +2403,9 @@
 		/* Check if we can expire some tasks */
 		next = wake_expired_tasks();
 
-		/* the first thread requests a synchronization to exit when
-		 * there is no active jobs anymore */
-		if (tid == 0 && jobs == 0)
-			THREAD_WANT_SYNC();
+		/* stop when there's nothing left to do */
+		if (jobs == 0)
+			break;
 
 		/* expire immediately if events are pending */
 		exp = now_ms;
@@ -2453,10 +2434,6 @@
 		/* check for server status updates */
 		servers_check_for_updates();
 
-		/* Synchronize all polling loops */
-		if (sync_poll_loop())
-			break;
-
 		activity[tid].loops++;
 	}
 }