emit offline only when disconnect for the last time
the clients in the reconnect test need to be ended explicitly because they wont die when server shuts down
emit error when existing when going offline
this is already done in connection.send
fix jshint issue
Merge pull request #34 from node-xmpp/moar-fix

Moar fix