Promise Capability object.

@typedef {Object} PromiseCapability
@property {Promise} promise - A promise object.
@property {function} resolve - Fullfills the promise.
@property {function} reject - Rejects the promise.
 
Creates a promise capability object.
@alias PDFJS.createPromiseCapability

@return {PromiseCapability} A capability object contains:
- a Promise, resolve and reject methods.
function createPromiseCapability() {
  var capability = {};
  capability.promise = new Promise(function (resolve, reject) {
    capability.resolve = resolve;
    capability.reject = reject;
  });
  return capability;
}