MB-11203: Refer to SSL_read()/SSL_peek before polling for read data

This fixes some issues with SSL receiving large amounts of data in its
input buffer.

Note this is a WIP and someone might have to fix this up. I don't know
how this may impact libevent - all I know is that it fixes my problem.

Change-Id: I2b235c301ce557e684c6d2224cebc8f45a36d560
Reviewed-on: http://review.couchbase.org/37537
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>