Minimal Promise/A+ implementation.