Bug 974120: Add helpers for using Promse::MaybeResolve/MaybeReject from C++. r=bz

Using JSAPI is tedious and error-prone.  It's much better to handle that once in the Promise code and allow callers to pass C++ objects.