Implement SkEncodeImage()

This change replaces the implementation in SkImageEncoder_none.cpp with
an implementation that allows the layer above to define an image
encoding function.

Background:  Skia's (experimental) XPS backend needs a PNG encoder.
Skia for Chromium does not compile its PNG encoder, but there is one
available in Chrome's gfx component.  To make layering work right,
I allow the layer above skia (gfx) to define an encoding function
that can be installed into skia.

TODO: initialize the function pointer in printing process.

Also: Revert "SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS"
This reverts commit 1430e85be96647271e370c92c4940244dc149e76.

BUG=chromium:616763

Review-Url: https://codereview.chromium.org/2527833002
Cr-Commit-Position: refs/heads/master@{#441395}
7 files changed