Introduce a union for the views

Views can be either a B-tree for the mapreduce views or an R-tree for
the spatial views. Hence they need a different kind of processing. This
commit prepares couchstore to support it.

Change-Id: I208e9a1c9d7a6981645f08e551fdda328379ba71
Reviewed-on: http://review.couchbase.org/39630
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>