refactor uuid hex usage

Change-Id: I799ec844e06400cd5889be372280251dce175b48
Reviewed-on: http://review.couchbase.org/24683
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>