Simplify maybe-returns-a-promise handling of Mocha in xpcshell glue.