Minimal Promise/A+ 1.1 implementation.