Add cb_thread_equals

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