JVMCBC-76: Listen on IO write operations to log failures.

Motivation
----------
If the void promise is used, less GC is produced, but we are loosing
the ability to see if something goes wrong during the write process.

Modifications
-------------
This code add listeners to write operations and logs when they fail. This
provides better insight by the slight penalty of more GC. Those callbacks
should be short-lived though, so they should die young.

In the future, this can be changed based on the debug level used to achieve
greater performance, but for now correctness is more important than the
last drop of performance.

Result
------
Better debugability of write failures.

Change-Id: I3e4f82f9b4cd495a3e4c4b49e8b8970fc785ce78
Reviewed-on: http://review.couchbase.org/43785
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>