Add bulk::detail::terminate

Make bulk::detail::throw_on_error __host__ __device__