[piexwasm] Add piex loader readFromFileSystem helper

Raw image preview requests contain the source file as a DOM fileSystem
URL. Add a helper to resolve the fileEntry associated with the URL and
read its content into an ArrayBuffer with the DOM fileSystem API.

Add closure markup / comments, add externs/platform.js to BUILD.gn for
the DOM fileSystem API declarations, and Closure compile the lot.

Bug: 904630
Change-Id: I80d3f695dfce939b92d42932db666c3ab272ac69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611624
Reviewed-by: Luciano Pacheco <lucmult@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660692}
2 files changed