Add a function to chain promise transformations.

I'm not sure that chain is the right name for this.
Allow a promise to carry information about its source.

This should be very useful, for instance when making a web request, you return a promise but have no reference to the originating request, so therefore can not cancel it or inspect it, etc.

Also, when composing a promise I think it would be very useful for debugging to be able to trace back through the chain of promises.