MB-9590 Set library path for MacOSX

Unfortunately it the runtime linker on MacOSX don't work
the same way as on our other platforms..

Change-Id: Ibe41018ce29e2fa87098887f9ee6728167d993c1
Reviewed-on: http://review.couchbase.org/30400
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Add cast to remove compiler warning (causing build break)

Change-Id: Ifd22bd8223269a3a9f5711a3c476a3842886ae1a
Reviewed-on: http://review.couchbase.org/30399
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix compile warnings from random key command

Change-Id: I959ac5903d1b01db1076a3837c961f78b1a69710
Reviewed-on: http://review.couchbase.org/30389
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Start migrate the API for our Atomics to look like std::atomic

This patch change the Atomic class CouchbaseAtomic, and change
the API so that:
  get() => load()
  set() => store()
  cas() => compare_exchange_strong()

and move some of methods that used to be members as
template functions.

Change-Id: I48d873fbf04f40d446444232db44f565ee4fed54
Reviewed-on: http://review.couchbase.org/30135
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>