MB-7013: Make the new vtree work with Apache CouchDB

This commits makes the new vtree work with Apache CouchDB 1.3.x.
All GeoCouch JavaScript tests pass. You should be able to use it
as a replacement for your current installation.

Change-Id: I6e42fc8149c447a294a52955a8b576b80ba00c74
Reviewed-on: http://review.couchbase.org/22994
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
MB-7013: Improve compaction test

The compaction test now also checks if the index contains exactly
the same documents pre and post compaction.

Change-Id: Ibf7eeba9fb01590d80fa2d69423640fac7f8f0fc
Reviewed-on: http://review.couchbase.org/22995
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>