Call rewindIfNeeded in SkCodec

Rather than calling it in each subclass, call it once in the base
class. Call it first, since other steps may modify internal structures
which would be replaced by a call to onRewind.

BUG=skia:4284

Review URL: https://codereview.chromium.org/1381483002
12 files changed