Build using CMake

Change-Id: I4c1af45be1b2f1e2112e323ba839405249815b4a
Reviewed-on: http://review.couchbase.org/28478
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>