Replace std::random_device by std::mt19937_64.

Because std::random_device is opaque, platform-dependent, and possibly of low quality (https://stackoverflow.com/a/39301751/1017348).