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 <michael.nitschinger@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>