JSCBC-12: Fix return code for write
JSCBC-12: Fix return code for write

2.0.2 use write notifications on a socket even if
we don't have any data to send to that socket to get
callbacks to process more input data (if we back off).

Another "bug" in libcouchbase tries to send 0 bytes, and
the bug here is that we return -1 for requests to send
0 bytes instead of returning 0 (that was the number of
bytes we sent)

Change-Id: Id7ecb8cc149f8d1ac7aa71d28968b12cdff05a75
Reviewed-on: http://review.couchbase.org/23864
Reviewed-by: Michael Nitschinger <97a35296d1b836d20f06df4c8d26a1141c9ad108@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>

actano/couchnode,ConnectedHomes/couchnode,GannettDigital/couchnode,jess-sheneberger/couchnode,couchbase/couchnode,Bloutiouf/couchnode,jess-sheneberger/couchnode,brett19/couchnode,corbinu/couchnode,kshmir/couchnode,GannettDigital/couchnode,couchbase/couchnode,couchbase/couchnode,ronkorving/couchnode,ConnectedHomes/couchnode,brett19/couchnode,kshmir/couchnode,Bloutiouf/couchnode,Bloutiouf/couchnode,ronkorving/couchnode,ConnectedHomes/couchnode,corbinu/couchnode,KenanSulayman/couchnode,actano/couchnode,ConnectedHomes/couchnode,KenanSulayman/couchnode,ronkorving/couchnode,corbinu/couchnode,ronkorving/couchnode,brett19/couchnode,jess-sheneberger/couchnode,couchbase/couchnode,jess-sheneberger/couchnode,kshmir/couchnode,GannettDigital/couchnode,Bloutiouf/couchnode,KenanSulayman/couchnode,KenanSulayman/couchnode,actano/couchnode