UA: allow callback-based mediaHandlerFactory to be used

This is done by promisifying getDescription/setDescription of the MediaHandlers
produced by the factory.

For reference, here are the commits where the API changed:
  setDescription: 52f88f9db87aad71a4a83282dde8296dcb001b10
  getDescription: 1368a6976d4c6c88d9fa2ee665bdb6f598dfefc6

The behavior can be verified using the following code:

var ua = new SIP.UA({
  mediaHandlerFactory: function makeCallbackHandler () {
    var MediaHandler = SIP.WebRTC.MediaHandler;
    var handler = MediaHandler.defaultFactory.apply(this, arguments);

    handler.getDescription = function getDescription (onSuccess, onFailure, mediaHint) {
      console.trace();
      MediaHandler.prototype.getDescription.call(handler, mediaHint)
        .then(onSuccess, onFailure);
    };

    handler.setDescription = function setDescription (sdp, onSuccess, onFailure) {
      console.trace();
      MediaHandler.prototype.setDescription.call(handler, sdp)
        .then(onSuccess, onFailure);
    };

    return handler;
  }
});
var session = ua.invite('welcome@onsip.com', new Audio());
dedupe Promise creation into Utils.promisify

promisify combines most of the former behavior of addPromise and callbacksLast
from commit 06db90a1624282849aa18fdd76f1f6f729fde9e9
Add an ice checking state timeout
WebRTC.MediaStreamManager.render: work if passed single stream

addresses #131
Add authenticationFactory.initialize()

It returns a Promise which resolves when the authenticationFactory can be used.

UA#onTransportConnected waits for initialize to resolve before registering.

If an authenticationFactory does not provide initialize, it is patched to
immediately resolve.
RequestSender: don't assume UA config password is necessary for auth

authenticationFactory.initialize could be used to derive the password on the fly
package.json: add postinstall script to build grammar

This allows sip.js to be browserified immediately after `npm install`,
without a separate build step
Dialog constructor: owner.emit('dialog', this);
Dialogs.js/SpecSession.js: Pass tests after previous commit
Merge pull request #134 from joseph-onsip/dialogevent

Emit created Dialogs from their owners
Session, Subscription: init 'dialog' event

Improves on 9533819 by allowing 'dialog' listeners to be added before Dialogs
are created.
EventEmitter: inherit from Node's EventEmitter

This reduces code duplication by using a well known/tested module:
  http://nodejs.org/api/events.html

This also preserves most of the public API:
  http://sipjs.com/api/0.6.0/eventEmitter/

See below for more details:

* #on, #once and #off do NOT take third arguments (bindTarget)

  listeners should be explicitly bound to their objects before passing to
  EventEmitter methods

* #setMaxListeners works like Node's

  - does NOT prevent extra listeners
  - passing 0 allows unlimited listeners

* #emit no longer returns `this`, works like Node's

* #checkListener has been removed

  The rest of SIP.js uses:

    emitter.listeners(eventName).length

  instead of:

    emitter.checkListener(eventName)

* remove all other methods and their tests

Supporting changes:

* test/spec/SpecSession.js: define .logger on the constructed Session

  This prevents tests from failing
  due to an artificially constructed Session's logger being undefined
  since the Session no longer has a logger by virtue of being an EventEmitter

* src/Session.js: fix the following methods to correctly return `this`:

  - failed
  - rejected
  - canceled
  - accepted
  - terminated
  - connecting
EventEmitter#off: add deprecation warning

(elsewhere): don't call #off except for in its tests
EventEmitter: use environment.console

This avoids bundling the module into the browser build.
src/EventEmitter.js: correctly inherit from Node's EventEmitter

https://github.com/joyent/node/wiki/Api-changes-between-v0.8-and-v0.10