Add const for objectregistry

Change-Id: I686b1f4241d92b05b059a329f3c80241551610a1
Reviewed-on: http://review.couchbase.org/37434
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>