Fix errors introduced when I rewrote select.  - Restructure selscan() and selrescan() to avoid producing extra selfps    when we have a fd in multiple sets.  As described below multiple selfps    may still exist for other reasons.  - Make selrescan() tolerate multiple selfds for a given descriptor    set since sockets use two selinfos per fd.  If an event on each selinfo    fires selrescan() will see the descriptor twice.  This could result in    select() returning 2x the number of fds actually existing in fd sets.
Fix errors introduced when I rewrote select.
 - Restructure selscan() and selrescan() to avoid producing extra selfps
   when we have a fd in multiple sets.  As described below multiple selfps
   may still exist for other reasons.
 - Make selrescan() tolerate multiple selfds for a given descriptor
   set since sockets use two selinfos per fd.  If an event on each selinfo
   fires selrescan() will see the descriptor twice.  This could result in
   select() returning 2x the number of fds actually existing in fd sets.

Reported by:	mgleason@ncftp.com

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase