Do full drain of the notification pipe

In some scenarios we've seen that we're getting an error
message that we're failing to write to the notification pipe.
If we're encountering bursts of "notify_io_complete" messages
which could fill the pipe. The logic here is that we're starting
by draining the pipe, then trying to process all of the events
available for this worker thread. Any new notifications happening
while we're processing the list of events will be process the
next time the events are handled.

Change-Id: I5dbf2053def2ca2f83d2293000faf686088be793
Reviewed-on: http://review.couchbase.org/41356
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>