Raise keepalive period from 1 to 10 minutes.

Research suggests that 1-2 hours is fast enough.
(cherry picked from commit bfc706fdc5e39046ff03188bb2a67bd7839b98eb)
Collect and consolidate the various timers in the app.

Poll period when xmpp is working, and when it is not, plus
the keepalive ping time.
(cherry picked from commit 91eae404aaa14950209dc1acc9541cc4df9a3f2a)
Variable spelling errors in xmpp.py exception handling.

Missing 'n' in XmppConnection self._conected.
(cherry picked from commit 7fa4647dfc38e4272e72fcb4d46c8fb2bec66c6c)
Unhandled exception in XMPP recv.

The following was in the user.log.

Traceback (most recent call last):
012  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 373, in process_jobs
012    xmpp_conn.await_notification(sleeptime)
012  File "/usr/share/cloudprint/cloudprint/xmpp.py", line 189, in await_notification
012    self._read_socket()
012  File "/usr/share/cloudprint/cloudprint/xmpp.py", line 55, in _read_socket
012    data = self._wrappedsock.recv(1024)
012  File "/usr/lib/python2.7/ssl.py", line 305, in recv
012    return self.read(buflen)
012  File "/usr/lib/python2.7/ssl.py", line 224, in read
012    return self._sslobj.read(len)
012error: [Errno 104] Connection reset by peer

Assume that this is because the exception is not of type 'Exception',
and change the except in process_jobs to pure except:.
(cherry picked from commit a7cdfdb1fca55cf8d83698f49945f60aef5f9adc)
Fix for another unhandled exception.

This one would be caught by a previous fix to process_jobs().
This change restores the close() call to the connection.

ERROR: Could not Connect to Cloud Service. Will Try again in %d Seconds
012Traceback (most recent call last):
012  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 371, in process_jobs
012    XMPP_USE_SSL,xmpp_auth)
012  File "/usr/share/cloudprint/cloudprint/xmpp.py", line 123, in connect
012    self._msg('<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="X-GOOGLE-TOKEN">%s</auth>' % sasl_token)
012  File "/usr/share/cloudprint/cloudprint/xmpp.py", line 87, in _msg
012    assert not elem.tag.endswith('failure') and not elem.tag.endswith('error')
012AssertionError
(cherry picked from commit 2c3582f87d281d612280def305871f8ce3dd20fc)
One more possible uncaught exception (not seen in the wild).

in XmppConnection _write_socket().
(cherry picked from commit 603ee43ff179f130d53cf50aba12364133d70ea1)
Fix TypeError when xmpp connection fails