trait/promise: promise/A+ implementation as trait

Still needs to be made compatible with jQuery Deferred for maximum
usefulness.