fix error and close events

* when a close event is generated, call back the errorCallback only if the
wasClean attribute of the event is false
* bind the websocket onerror handler to the errorCallback handler if it
  set
* in stomp-node.coffee, bind the error event to the websocket onerror
  handler and the close event to the onclose event