Delay sending invite until the next 'tick'
Delay sending invite until the next 'tick'

In order to allow API consumers to register to events emitted by the client
context, we need to make sure that no events are emitted until after the
context has been returned. We do this by using waitForConnected, a promise
to when the UA is connected.

We now also emit inviteSent only once the invite *has* actually been sent.
If the UA was not connected yet, the event was emitted before the invite had
been sent.

onsip/SIP.js,onsip/SIP.js