function Promise_defer() {

    var handler = new Pending();
    var promise = new Promise(handler);
    var deferred = new Deferred(promise);

    return deferred;
}
Constructs a {promise, resolve, reject} object.

`resolve` is a callback to invoke with a more resolved value for the
promise. To fulfill the promise, invoke `resolve` with any value that is
not a thenable. To reject the promise, invoke `resolve` with a rejected
thenable, or invoke `reject` with the reason directly. To resolve the
promise to another thenable, thus putting it in the same state, invoke
`resolve` with that other thenable.

@returns {{promise, resolve, reject}} a deferred