Support coverage when compiling for CUDA. (#4962)
* Support coverage when compiling for CUDA.
Passing `--config=cuda` to bazel makes it use a nvc/gcc compiler
infrastructure in `@local_config_cuda` that is immune to the
`bazel coverage` intervention in coverage flags. Setting those
flags manually solves the problem.
* Only cover repository files, not external dependencies.
* Improve coverage handling
* Fix copying coverage when only testing