Adapt to latest core changes and change View API

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