Avoid name conflicts between cuda and opencl.

Also pulled some common extern definitions out.
halide_runtime_internal -> Halide::Runtime::Internal