Initial promise tests

Manually created some Promise tests.

I  believe the semantics of the $DONE() function should be changed.  At present $DONE(undefined) is       reported as an error.  A standard testing idiom is to do this:

    Promise.resolve().then(function delayed() {
          // assertions

          return;
     }).then($DONE,$DONE);

this idiom results in a call to `$DONE(some_error_object)` if any assertion throws, and `$DONE(undefined)` if none throws.  (The `undefined` comes from the return value of function `delayed`)

This PR consists of two patches; one to commit the Promise tests, and one to change the behavior of $DONE.