correctly test for iterator invalidness [backport]
correctly test for iterator invalidness [backport]

Change-Id: Ic241b6520c01d0b65a6568758a62f6bf1cd8976c
Reviewed-on: http://review.membase.org/4761
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Tested-by: Aliaksey Kandratsenka <340b8e09ca65cd3fc686427fcfed17e87eaf61e2@gmail.com>
Reviewed-on: http://review.membase.org/4762
Reviewed-by: Steve Yen <ef850f73f7832052d3c6d9b5ddd3a1716d9a57f1@gmail.com>
Tested-by: Steve Yen <ef850f73f7832052d3c6d9b5ddd3a1716d9a57f1@gmail.com>

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