media: Validate min/max surface size in IsVaapiSupportedJpeg().

This CL makes IsVaapiSupportedJpeg() detect the min and max supported
surface size for JPEG decoding instead of using hard-coded values.
Tests are added to validate this new behavior.

Test: jpeg_decode_accelerator_unittest passes on grunt and samus.
Bug: 934560
Change-Id: I3677584c90e9402c660790311c7e4b239d4a13a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1482137
Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641378}
5 files changed