Detach from a context cleanly.
Detach from a context and remove its pop() from atexit.
ctx : pycuda.driver.Context
Context from which to detach.