WebNN: make createBuffer() return promise
Changes buffer creation to be promised based, which has the following
advantages:
- Ability to determine if backend actually succeeded.
- Consistency with WebIDL due to use of factory pattern.
- Future ability to re-try using smaller model.
To achieve this, tokens are now minted in the privileged process.
Existing backend tests that relied on specifying tokens were
removed.
Bug: 349653201
Change-Id: I8ef6b2c6c7ad21bdf030b037117d5716516e94f4
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5703103
Reviewed-by: Alex Gough ajgo@chromium.org
Commit-Queue: Bryan Bernhart bryan.bernhart@intel.com
Reviewed-by: Austin Sullivan asully@chromium.org
Cr-Commit-Position: refs/heads/main@{#1333681}