Xmpp.py

This is a pull request for a mod of the richvdh:master XMPP rework. It encompasses pull #58, with the changes called for in that discussion, and also adding a number of changes to improve reliability and logging. 

This represents one of three patch sets that make up the changes incorporated into [cloudprint-service](https://github.com/davesteele/cloudprint-service) versions 10.7 & 10.8. The other two upcoming sets build on this, addressing an [XMPP protocol update](https://github.com/davesteele/cloudprint/commit/84d74f9ee) and a fix for [SASL token timeouts](https://github.com/davesteele/cloudprint/compare/xmpp.py...usercred).

This has mostly been burned in for a couple of months, in the form of my [develop](https://github.com/davesteele/cloudprint/commits/develop) branch. Popcon suggests that there are ~100 installs.

There have been two reports of no XMPP notifications (one from richvdh), causing delays in printing. The other user resolved by moving to a different Google account (see davesteele/cloudprint-service#5 ). I suspect that the problem is independent of the patches (e.g. see Xxalfalfaxx in #40).