[UR][CUDA][HIP] Cleanup use of assertions and die (#18118)
This patch cleans up most of the uses of `die()` in the CUDA and HIP
adapters, it was replaced by:
* Using regular `assert()`
* Using `UR_CHECK_ERROR`
* Returning an appropriate error code
* Throw an appropriate error code
* Return an adapter specific error code with a message