Minimal refactoring
Minimal refactoring

- More consistent function naming
- More logical function grouping

No functional changes

jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth,jsxc/xmpp-cloud-auth