Fix crash if XMPP connection unsuccessful

Also rework the patches to match the cloudprint git repo.
Merge branch 'develop' into release, for 0.10-6