Use cb_gmtime_r instead of gmtime_r

Change-Id: I49d19bbea22e31bd600f694acf89d98ffa3a62f3
Reviewed-on: http://review.couchbase.org/43350
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>