Handle OffscreenCanvas.convertToBlob exceptions: EncodingError & InvalidStateError

This CL handle two new exceptions:
1. EncodingError exception when convertToBlob fails encoding; the test case we
use here is to attempt encoding webp that exceeds max dimension. This is
consistent with new spec change: https://github.com/whatwg/html/pull/2343
2. InvalidStateError exception when convertToBlob is calling on an OffscreenCanvas
without rendering contexts. Spec change needs to be done later on.

Meanwhile, this CL also fixed crash bug in the corner case when convertToBlob
with webp image type fails.

BUG=659260, 563830

Review-Url: https://codereview.chromium.org/2695343002
Cr-Commit-Position: refs/heads/master@{#452935}
3 files changed