On mixing the driver and runtime APIs, it is quite possible that a
context already exists due to runtime API usage. In this case, we should
try to use the same context.
Teach GPUJIT to detect that a context exists and how to pick up this context.
This is a part of (https://reviews.llvm.org/D35991) that was extracted
out.