RNG: several fixes/improvements, rename rng_state to clo_statetype

- All RNG implementations must specify how to convert ulong (base
seed) to clo_statetype.
- Fix device seed initialization, which now requires the above
change in the RNG implementations, and respects the actual seed
size in bytes.