Client lib: fix condition reversal in the chunk writer state machine.
Kfsio library: enable read ahead in ssl filter in order to reduce number of system calls. Use SSL_peek instead of SSL_pending to determine if data buffered inside opnessl is available for read, as the later will not work if the read stops at ssl / tls record boundary. Keep invoking SSL_read until it returns 0 or less bytes, in order to handle the case where more than one ssl / tls record were pre-fetched by read ahead, and SSL_read ends at the ssl/tls record boundary.