CBQE-1362: clean up views code

Change-Id: Ie32a14bb375019520b03dde2b33988d4caeb0774
Reviewed-on: http://review.couchbase.org/27098
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Deepkaran Salooja <deepkaran.salooja@globallogic.com>