Stanzas with no type should be of type "normal"

Section 2.1.1 - http://xmpp.org/rfcs/rfc3921.html
Move client config to new module
Use `self()` instead of just `self`
DRY
Don't assume a socket connection.

Try to connect in a loop and wait until we are connected before
proceeding.
Ensure everything gets restarted when the connection closes
log incoming stanzas as XML before parsing.
If the socket is nil, connected? returns false
whitespace
Call the fully qualified MFA in order to support hot code swapping