Maintain a cursor's offset in a consistent way.

This change makes sure that a cursor's offset includes checkpoint
meta items (e.g., checkpoint_start, checkpoint_end).
However, when we calculate the number of items remaining for
persistence or replication, we should not consider those meta
items.

Change-Id: I8a90c347c163674decdb7ed1b5eb824a5b9d4f86
Reviewed-on: http://review.couchbase.org/39298
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>