Use curand device API for random number generation to expose RNG state.

Change RNG code from using curand's host API to the device API. This
allows us to expose the state of the RNG to the user for saving and
restoring.