Fix require('ddp') statement in Readme example
Add message filters.

Message filters are functions that get called when a message is
received. All message filter functions are called before the ddp message
is processed with the DDPClient.prototype._message method which is
guaranteed to be called last.

Message filters can be added in the constructor function options hash or
by calling the onMessage method with the function passed as a parameter.
The callback function takes two parameters: data and flags. Its context
(this) will be the DDPClient.
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
Added some code to test for failed connections.
Whoops.
No longer bother removing the callbacks, app should quit.
Fix infinite loop when closing a DDP Connection

Found it! When calling close it would attempt to reconnect since
`auto_reconnect` is set to true by default.
Use `isClosing` to represent if a socket has been closed
Merge pull request #17 from Tarangp/master

Fix infinite loop when calling close when auto_reconnect is enabled