function allResolved(promises) {
    return when(promises, function (promises) {
        promises = array_map(promises, Q);
        return when(all(array_map(promises, function (promise) {
            return when(promise, noop, noop);
        })), function () {
            return promises;
        });
    });
}
Terminates a chain of promises, forcing rejections to be
thrown as exceptions.
@param {Any*} promise at the end of a chain of promises
@returns nothing