Consider memory usage in creating a new checkpoint by TAP consumer
Consider memory usage in creating a new checkpoint by TAP consumer

If 1.7 TAP consumer connects to TAP producer that does not support
checkpoint operations, it should create a new checkpoint for itself
and consider the current memory usage in creating a new checkpoint.

If the current memory usage is too high, TAP consumer triggers the
creation of a new checkpoint, so that the item pager can purge
items from the old open checkpoint.

Change-Id: I10a4daf5033e78d9743ae297870355992bc9fbba
Reviewed-on: http://review.couchbase.org/7015
Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Reviewed-by: Bin Cui <ed18693fff32c00e22495f4877a3b901bed09041@gmail.com>

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