code: async function thenFinally(promise, callback) {
    try {
      await Promise.resolve(promise);
      return callback();
    } catch (e) {
      await callback();
      throw e;
    }
  }
docs: Registers a listener to invoke when a promise is resolved, regardless
  of whether the promise's value was successfully computed. This function
  is synonymous with the {@code finally} clause in a synchronous API:
  
  // Synchronous API:
  try {
  doSynchronousWork();
  } finally {
  cleanUp();
  }
  
  // Asynchronous promise API:
  doAsynchronousWork().finally(cleanUp);
  
  __Note:__ similar to the {@code finally} clause, if the registered
  callback returns a rejected promise or throws an error, it will silently
  replace the rejection error (if any) from this promise:
  
  try {
  throw Error('one');
  } finally {
  throw Error('two');  // Hides Error: one
  }
  
  let p = Promise.reject(Error('one'));
  promise.finally(p, function() {
  throw Error('two');  // Hides Error: one
  });
  
  @param {!IThenable<?>} promise The promise to add the listener to.
  @param {function(): (R|IThenable<R>)} callback The function to call when
  the promise is resolved.
  @return {!Promise<R>} A promise that will be resolved with the callback
  result.
  @template R