function timeout(seconds, asyncProcess) {
  return Promise.race([
    asyncProcess,
    new Promise(((_, reject) => {
      setTimeout(reject, seconds * 1000);
    })),
  ]);
}
Returns a Promise which is resolved only if |asyncProcess| is resolved, and
only if it is resolved in less than |seconds| seconds.

If the returned Promise is resolved, it returns the same value as
|asyncProcess|.

If |asyncProcess| fails, the returned Promise is rejected.
If |asyncProcess| takes too long, the returned Promise is rejected, but
|asyncProcess| is still allowed to complete.

@param {number} seconds
@param {!Promise<T>} asyncProcess
@return {!Promise<T>}
@template T