MINOR: threads: make use of thread_mask() to simplify some thread calculations

By doing so it's visible that some fd_insert() calls were relying on
MAX_THREADS while all_threads_mask should have been more suitable.
diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c
index 068b24f..9105dd2 100644
--- a/src/proto_sockpair.c
+++ b/src/proto_sockpair.c
@@ -153,8 +153,7 @@
 	listener->state = LI_LISTEN;
 
 	fd_insert(fd, listener, listener->proto->accept,
-		  listener->bind_conf->bind_thread[relative_pid-1] ?
-		  listener->bind_conf->bind_thread[relative_pid-1] : MAX_THREADS_MASK);
+	          thread_mask(listener->bind_conf->bind_thread[relative_pid-1]));
 
 	return err;