Before, we did not have a way to track deleted devices. All of them linger in the device list tracker with no mark of deletion. This also caused megolm keys to be sent to these devices. This commit introduces a `deleted` marker; when a /keys/query is sent to obtain the full device list of a certain user, any device not in the response will be marked as deleted. ClientModel::devicesToSendKeys() will also exclude deleted devices so we no longer send session keys to them.
Type: fix
Adapted from output of OpenCode (DeepSeek V4 Pro; GLM 5.2). tusooa reviewed the code and takes full responsibility.