CCBC-171 Fix invalid read in libevent plugin

Change-Id: Ia56998ad6fb81eca6a08393c6fe1a0543c139a74
Reviewed-on: http://review.couchbase.org/24316
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>