Adding function random16()

Generates a random string in base 16 (hex) of the given length,
trying to generate cryptographically strong randomness where possible.