Improve error handling

Restart XMPP after 5 minutes on failure.
Make periodic update failures non-fatal.