CUDA: Avoid using deprecated cublas_device to identify device lib dirs

Use `curand_static` to identify directories containing device libraries
because `cublas_device` is deprecated and will be removed in the future.

Issue: #18290
11 jobs for dont_look_for_deprecated_cuda_device
Status Job ID Name Coverage
  External
passed ghostflow-branch-check-master

passed ghostflow-commit-check

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager

passed ghostflow-stager