rusticl: deal with device context resets
This should help with identifying issues in applications. Some of them report issues in terms of rusticl not calculating things properly, where in fact it's simply the GPU running kernels to time out.
See #12361 for instance.