Refactor ImageDecoder factories

The vast majority of ImageDecoder::create clients do something along
these lines:

  sniffResult = ImageDecoder::determineImageType(data);
  decoder = ImageDecoder::create(sniffResult, ...);
  if (decoder)
      decoder->setData(data, ...);

I.e.

1) we start off with some data in a SharedBuffer
2) we call determineImageType() on that data, to figure the codec type
3) we instantiate the decoder
4) and, finally, we pass the data to the new decoder using setData()

The downsides are

a) determineImageType() allocates a temporary SegmentReader in order
to use FastSegmentReader for signature consolidation; this reader is
then thrown away and recreated in setData() (because internally
ImageDecoder stores a SegmentReader).

b) unnecessarily verbose/stateful decoder construction sequence

This CL expands the create() factory to fuse all these steps.  We get
to reuse a single SegmentReader, and the construction is now atomic.

We also get to remove determineImageType from the public ImageDecoder
API.

Refactoring only, no functional changes expected.

Review-Url: https://codereview.chromium.org/2257513002
Cr-Commit-Position: refs/heads/master@{#413736}
17 files changed