OpenSSL: Use SSL_pending() to determine if we want a select() before SSL_read()
OpenSSL: Use SSL_pending() to determine if we want a select() before SSL_read()

In order to obey the timeout in idevice_connection_receive_timeout(), we are
using select() via socket_check_fd(). However, the SSL bio might have buffered
more bytes than actually requested upon a call to SSL_read(), so in the next
call to idevice_connection_receive_timeout() a select() would not find the fd
being ready to read, and make it fail with an error, after the specified
timeout is reached.
With the help of SSL_pending() we can now skip calling select() so that
SSL_read() will directly be called again.

libimobiledevice-win32/libimobiledevice,libimobiledevice/libimobiledevice,libimobiledevice-win32/libimobiledevice,libimobiledevice-win32/libimobiledevice,libimobiledevice/libimobiledevice,libimobiledevice-win32/libimobiledevice