Re-initialize curand RNG when changing device

Fixes #165