isThenable = (v) => Thenable.isImplementedBy(v) ||
      (typeof goog.global['Promise'] === 'function' &&
       v instanceof goog.global['Promise'])
Calls a chain of methods and makes sure to properly chain them if any of the
methods returns a thenable.
@param {!Array<function()>} fns
@param {boolean=} ensureAllFnsCalled If true, this method calls each function
    even if one of them throws an Error or returns a rejected Promise. If
    there were any Errors thrown (or Promises rejected), the first Error will
    be rethrown after all of the functions are called.
@return {!IThenable<*>|undefined}
@private