network: replace select(2) by poll(2) and  WSAPoll to fix the 1024 fd limit (#2948)
network: replace select(2) by poll(2) and  WSAPoll to fix the 1024 fd limit (#2948)

* Replace `select` by `poll` to fix the 1024 fd limit
* network: Use WSAPoll on Windows
* Remove useless variable when change select to poll

Seems like the implementation of select define a limit about the maximum amount of fd to monitor. As the documentation recommend, we could use `poll` or `epoll`.

Windows does not provide `poll()` but has an (almost) equivalent
function called WSAPoll().

I confirmed this patch works by running S3 plugin against AWS (which uses sync connection to put objects).

Signed-off-by: Adrien Carreira <307c42e0fe073416f59a074cf31f0bfbb1831d3f@ovhcloud.com>
Co-authored-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@ceptord.net>
Co-authored-by: Adrien Carreira <307c42e0fe073416f59a074cf31f0bfbb1831d3f@ovhcloud.com>
fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit