Eliminate select(2) system calls when they are not necessary.
The idea is checking select(2) timeout parameter set in a static
variable in pool_read() and pool_read2(). If it's -1, it means no
select timeout will be set in pool_check_fd(), which implies we can
avoid to call pool_check_fd().
Also I moved pool_check_fd() and friends to pool_stream.c from a
modularity point of view.
This gives slight performance improvement according to Jesper
Pedersen.
Bottleneck analysis and suggestions from Jesper Pedersen.
Discussion: [pgpool-hackers: 3247] https://www.pgpool.net/pipermail/pgpool-hackers/2019-February/003247.html