Merge pull request #5 from sarfata/8ce7dc0f375830e079f6c8001c2c648b4332b876

Fix require('ddp') statement in Readme example
Added support for on('close') and on('error') + Refactoring

 * Added dependency to util and events + ddpclient inherits from EventEmitter
 * connect(cb) becomes on('connect', cb) (the old style is still supported but marked as deprecated)
 * onMessage(cb) becomes on('message', cb)
 * Added on('error') and on('close')
 * Examples updated in README.md + examples/examples.js
 * (+A few fix in the examples)
Removing : replaced by on('message')
Automatically reconnect (by default) - Rename socket events

 * Connect callback passed to the connect() function - Will be called
   automatically each time the connection is established.
 * ddp will automatically reconnect when the connection is closed
 * opts.auto_reconnect and opts.auto_reconnect_timer can be set to change the
   default reconnect behaviour
 * ddp emits `socket-error` and `socket-close` when an error or a close occurs
Merge pull request #7 from sarfata/event-emitter

Add callbacks when message received, error occurs or connection closed
jslint fixes

removed end of line whitespace, added optional semicolons
connection properties and capture session
update subscription

replaced 'data' with 'added', 'removed', and 'changed'
added 'ready'
removed _updateCollection
add unsubscribe method and update TODO
updated readme
Merge pull request #10 from emgee3/ddp-pre1-emgee3

Ddp pre1 emgee3
Release new version
reconciling histories