add nonce generation function to remove strain on /dev/urandom on
slow embedded devices. Wrote test to make sure that nonces are
indeed unique.
take sleep() out of urandomdev(), since it just causes problems, and
read() should block if there aren't bytes available yet.
use generate_nonce() to generate a nonce, instead of reading from
/dev/urandom every time.