code: function coerce(promise) {
          var deferred = defer();
          nextTick(function () {
              try {
                  promise.then(deferred.resolve, deferred.reject, deferred.notify);
              } catch (exception) {
                  deferred.reject(exception);
              }
          });
          return deferred.promise;
      }
docs: Converts thenables to Q promises.
  @param promise thenable promise
  @returns a Q promise