MB-5935: Don't decr non-resident deleted items twice
MB-5935: Don't decr non-resident deleted items twice

There are many reasons that we can delete an item multiple
times. A couple are listed below:

1. And item can be set with a short expiration time. This can
cause a delete to be replicated due to expiration and a delete
to be replicated when the item actually is expired in that node.

2. XDCR can cause multiple deletes. An item can be deleted
locally and then just after this happens be deleted from the
remote cluster.

The problem is that when we delete an item we reset the value and
mark the item as non-resident since no value exists for the item.
If an item is deleted twice the non-resident item counter can be
decremented multiple times. This change makes sure an item is not
already deleted before decrementing the counter.

Change-Id: I0b24f803543825565bd8446eb717b8beb1989cca
Reviewed-on: http://review.couchbase.org/19042
Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>

abhinavdangeti/ep-engine,teligent-ru/ep-engine,membase/ep-engine,hisundar/ep-engine,membase/ep-engine,daverigby/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,daverigby/kv_engine,membase/ep-engine,owendCB/ep-engine,owendCB/ep-engine,sriganes/ep-engine,owendCB/ep-engine,daverigby/ep-engine,jimwwalker/ep-engine,hisundar/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,daverigby/kv_engine,jimwwalker/ep-engine,abhinavdangeti/ep-engine,daverigby/ep-engine,teligent-ru/ep-engine,membase/ep-engine,teligent-ru/ep-engine,abhinavdangeti/ep-engine,daverigby/kv_engine,daverigby/ep-engine,sriganes/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,couchbase/ep-engine,sriganes/ep-engine,owendCB/ep-engine,abhinavdangeti/ep-engine,couchbase/ep-engine,sriganes/ep-engine,hisundar/ep-engine,abhinavdangeti/ep-engine,hisundar/ep-engine