don't be hard-limited to 8192 filedescriptors but use the system limit instead

also a bug would have coused a memory corruption if the fd returned by connect
was higher than 8191 because it would have overflowed the fd_set array
(which size was hardcoded to hold at  most 8192 filedescriptors)