[MB-5073] Check whether temp item is clean before restoreMeta()
[MB-5073] Check whether temp item is clean before restoreMeta()

While the bgfetch of a non-resident/non-existent key is underway,
there might be intervening mutations to the key in memory. In such a
case we must not restore the metadata of the key. We verify this by
checking whether the temp item is still clean.

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

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