[ci][distributed] fix some cuda init that makes it necessary to use spawn (#5991)
test_utils.py
tests/utils.py