respect reduced views and better object handling.

Change-Id: I8f9d51e46d405619d876c95a1d622f2595956dee
Reviewed-on: http://review.couchbase.org/40536
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>