Move to CMake

Change-Id: I315fab331ec4c919f059817c370de2fcdcb07d09
Reviewed-on: http://review.couchbase.org/32328
Reviewed-by: Nimish Gupta <nimish@couchbase.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>