device: Catch client disconnect during Release
If the client disconnected while the release call was stopping the current action, then the disconnect will be processed. This means that the device can be closed already and the session is destroyed.
Add a check for this, in the same way that the vanished handler deals with this corner case.