Add support for writing icc profiles to the jpeg encoder

Also, share the impl for skjpeg_error_mgr between the
jpeg decoder and encoder.  They are already identical
anyway.

BUG=skia:

Change-Id: I029312406dee8734744cc3058acd1f153aefcd83
Reviewed-on: https://skia-review.googlesource.com/9971
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
9 files changed