Generate nonces securely

Use the OS secure random facility to get random numbers, not rand()
Also makes the CRAM-MD5 challenge simply a hex-encoding of random
bytes.

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