Fixed: "TypeError: Cannot call method 'end' of undefined" on lib/xmpp/connection.js:300

Altered Connection.prototype.onEnd() to check that `this.socket` is defined before calling this.socket.end().

Example error stacktrace included below this line.

/var/node/node_modules/node-xmpp/lib/xmpp/connection.js:300
    this.socket.end();
                ^
TypeError: Cannot call method 'end' of undefined
    at Connection.onEnd (/var/node/node_modules/node-xmpp/lib/xmpp/connection.js:300:17)
    at CleartextStream.<anonymous> (/var/node/node_modules/node-xmpp/lib/xmpp/connection.js:61:14)
    at CleartextStream.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:910:16
    at process._tickCallback (node.js:415:13)
Merge pull request #122 from flamadiddle/master

 Fixed: "TypeError: Cannot call method 'end' of undefined"
0.4.5
missing that when retrying to connect via bosh
remove browserify hacks
only devDepend on browserify
add myself to the contributors
Merge pull request #126 from dodo/upstream+browser

Upstream+browser
0.5.0
Add browserify as a dependency
0.5.1
add mocha as dependency

allows npm to use local ./node_modules/.bin/mocha when using `npm test`
if mocha isn't installed globally (`npm i -g mocha`).
add docu for browser bundle
Merge pull request #129 from dodo/upstream+browser

browser docu
Fixed two wrong method invokations in the TLF code
Merge pull request #131 from vivocha/master

The TLS code in C2S was not updated to access the socket through the connection
Update version
fixed composition bug
fixed the fix ;-)
Merge pull request #136 from flosse/composition-fix

fixed composition bug