Added the convenience method Promise.when

Added the convenience method Promise.when that, when passed multiple promises will return a new promise. The returned promise will be fulfilled when all the original promises have been fulfilled.
If any of the original promises are rejected, the new promise will be rejected immediately.