Factor out SetValue and SetReason.

This does not change normative behavior. It DRYs up the consistent "... and call `ProcessOutstandingThens`", and gives the opportunity to do an assert and some (unnecessary) cleanup.

Also general cleanup, e.g. moving notes below the steps, ensuring no line contains two operations, and rephrasing `CallHandler` to match the code a bit better.
Fix IsObject code to allow functions.
Add just-in-time thenable unwrapping. Closes #3.

Note that this necessitated a fix to a bug in `Resolve` which was previously hidden.

We are now passing all Promises/A+ tests except 2.3.1.