fix(device): ensure device appears offline if receive loop terminates
There appear to be unknown error conditions that are ending the receive loop on some
(3.4) devices. While this does not help track these down, we can at least ensure that
the connection to the device is properly closed to prevent issues trying to reconnect
it later, and that the device appears as unavailable rather than remaining as a zombie
showing stale state.
Issue #5848