Fix missing "this"
Add thennable versions of "emitMessage()", "close()" and "once()"
Migrate from JSDeferred to Q.

Because we should use standard (well-known) APIs instead of cusom one.
Q includes ES6 Promise-compatible API, so it is easy to migrate Q to ES6 Promise finally.