Transition to CMake

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