Fixed possible bug with createRandomPermutation

createRandomSeeds and createRandomPermutation were previous called one
after another asynchronously and the device was not syncing with cpu
until after both kernels finished. As createRandomPermutation actually
relies on the seeds from createRandomSeeds, I'm switching them around
and placing a cudaDeviceSynchronize() between them.