Fixed purging during disconnect

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