Fix rooms no longer synchronized after a previous synchronization failed
Fix rooms no longer synchronized after a previous synchronization failed

"syncRooms" returns a deferred object, but if the request failed the
deferred object was not rejected; due to this "internalSyncRooms" only
handled successful synchronizations, but if a synchronization failed the
"_pendingSyncRooms" property was never cleared, and thus further calls
to "internalSyncRooms" did nothing (as it assumed that the previous
synchronization was still being performed even if it failed already).
Now "syncRooms" properly signal a synchronization failure by rejecting
the deferred object and "internalSyncRooms" handles that by clearing the
"_pendingSyncRooms" property, thus allowing further calls to
"internalSyncRooms" to perform a synchronization again.

Signed-off-by: Daniel Calviño Sánchez <bd7629e975cc0e00ea7cda4ab6a120f2ee42ac1b@gmail.com>

nextcloud/spreed,nextcloud/spreed,nextcloud/spreed