Fixes a polling crash that could occur after receiving a new friend's first message, plus several UI-update issues: delete-friend now clears the chat panel, friend acceptances received while the app is in the background appear immediately on resume (no more stuck "FR to …" rows), and the polling thread is hardened against unexpected errors.