A direct implementation of Promise as specified for ES6.