Transition to CMake

Change-Id: I949c21c2420ad4bdd917dc14b1f1ea9c69d876a4
Reviewed-on: http://review.couchbase.org/29983
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>