Output encoded PNGs when gltestthreading or serialize fails
Output encoded PNGs when gltestthreading or serialize fails

For configs that compare results of two drawing methods, it's helpful to
know how the two images differed. This takes both images, PNG encodes them
(at maximum compression settings), then base64 encodes them into data URIs
so they can be viewed directly from the logs.

These kinds of failures are typically very rare, and currently happen
infrequently due to flaky GMs - we don't want to be using this kind of
facility all the time.

Bug: skia:7011
Change-Id: Ib6c271cb8f6cd657cf6ca8ccfee97d0193b4e6ed
Reviewed-on: https://skia-review.googlesource.com/43240
Reviewed-by: Kevin Lubick <7cdab2cfab351f23814786ba39716e90eed69047@google.com>
Commit-Queue: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>

google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,google/skia