MB-25723: Force reading the next packet for SSL connections
MB-25723: Force reading the next packet for SSL connections

I've seen cases where the SSL tests would hang because we've
successfully completed a command, but the next command was
stuck inside our input buffers. We would then enter the
waiting state, but as the client was done sending the command
we don't get a read notification on the socket.

To work around that problem let's try to fetch the next command
header from the input stream (which would cause those buffers
to be drained) for SSL connections. If the packet isn't
available it'll enter the conn_waiting state.

For plain connections we don't have data spooled up in this
case so we don't need the extra "recv" call.

Change-Id: I6cbdf6ad254b6096975d5c14be40fd2a2ecf842b
Reviewed-on: http://review.couchbase.org/82394
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>

daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine