clean up code style
nodejs code style
refactored connection
Merge pull request #18 from node-xmpp/refactor-connection

Refactor connection