Fix unread badge showing when not needed

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Fix database upgrade errors (fix #202)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Fix XMPP upgrade issues

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>