Poll for new jobs via HTTP as well as listening for XMPP notifications

This is an attempt to work around issue #48 - in particular, by polling for jobs via the REST API as well as listening for XMPP notifications.

It also attempts to keep the XMPP connection alive by sending keepalives, and will reconnect it if it fails.