Minor refactoring on checkpoint cursor registration function.

Change-Id: I7fdffc233664e26a434e0c757e72416e567d1eb2
Reviewed-on: http://review.couchbase.org/40192
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>