Move the CUDA device parsing to cuda_init() and move the latter to
common-cuda.c (built by gcc, not nvcc).