Updates to handle some XMPP protocol changes

Authored by @phineasgage. Rebased to master.

Documented at https://developers.google.com/cloud-print/docs/rawxmpp

This is reported to address #48. I don't have confirmation of that.
no problems encountered in testing.

The fix is works for @phineasgage.
@richvdh reports that the problem remains.