Check failure of dbus_connection_send_with_reply()
Use app_hash to find app to remove in response to NameOwnerChanged

Previously, we were fetching the desktop, and apparently this may return
NULL if the registry is gone. I'm not sure if this should be happening,
and I have no idea if there may be other NULL pointer dereferences in
that case, but this removes one of them and simplifies the code a bit.