Force promise rejection values to be Error objects.
Move towards the standard promise API

Promise is no longer an abstract class and its constructor takes a
resolver function. Deferred is no longer an instanceof Promise, but it
still (temporarily) implements Thenable for API backwards compatibility.
Fix a few js compile errors

* Document optional parameter
* Remove no-op if statement
* Remove use of deprecated function
Fixing stack frame parser for Firefox new stack trace format (with column numbers and more allowed symbols in function names). Fixes issue 8093