Transition to CMake

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