[Extensions Bindings] Support promises in APISignature

Support parsing promises in APISignature. For an asynchronous API:
- If the signature does not support promises (default), only support
  callbacks (and fail if a required callback is not provided).
- If the signature supports promises, assume the response will be
  handled by a promise if a callback is not provided.

Add unittests for the same.

Bug: 978538
Change-Id: I3191182a2d8775c4ea754a8901d3daf892e6f07a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1676876
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#679207}
4 files changed