[BUG] debug: report the correct poller list in verbose mode

When running with -vv or -V -d, the list of usable polling systems
is reported. The final selection did not take into account the
possible failures during the tests, which is misleading and could
make one think that a non-working poller will be used, while it is
not the case. Fix that to really report the correct ones.
(cherry picked from commit 6d0e354e0171f08b7b3868ad2882c3663bd068a7)
diff --git a/src/fd.c b/src/fd.c
index c850efa..80bddd6 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -119,11 +119,12 @@
 	last = next = -1;
 	while (1) {
 		for (p = 0; p < nbpollers; p++) {
-			if (!bp || (pollers[p].pref > bp->pref))
-				bp = &pollers[p];
 			if ((next < 0 || pollers[p].pref > next)
-			    && (last < 0 || pollers[p].pref < last))
+			    && (last < 0 || pollers[p].pref < last)) {
 				next = pollers[p].pref;
+				if (!bp || (pollers[p].pref > bp->pref))
+					bp = &pollers[p];
+			}
 		}
 
 		if (next == -1)
@@ -140,8 +141,11 @@
 					fprintf(out, " test result OK");
 					if (next > 0)
 						usable++;
-				} else
+				} else {
 					fprintf(out, " test result FAILED");
+					if (bp == &pollers[p])
+						bp = NULL;
+				}
 				fprintf(out, "\n");
 			}
 		}