Factor out IO::select logic into separate method
Factor out IO::select logic into separate method

Should always rescue both IO::WaitReadable and IO::WaitWritable because
SSL renegotiation can cause write system call in read_nonblock and vice
versa.

aerospike/aerospike-client-ruby,aerospike/aerospike-client-ruby