fix saving and fetching of observable objects

Change-Id: I33a3aea25816bfd3c5571d5b50abacb9d2a7ac53
Reviewed-on: http://review.couchbase.org/24107
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>