Better reconnection with ping server task

This took so elbow grease, but now we have much faster reconnection to XMPP server. The parameters are hard-coded for now. They should be configurable. But that should be an easy addition for a later date.