Build couchdb under cmake

Change-Id: I472443b41b9a7ba254d75544d69d514c4dbb9ef8
Reviewed-on: http://review.couchbase.org/34678
Reviewed-by: Chris Hillery <ceej@couchbase.com>
Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>