Handle SkStream::rewind properly.

include/core/SkStream.h:
Update documentation to state that rewinding a stream at the beginning
should return true. This is important because our decoders fail if
rewind returns false, assuming that the stream is not at the beginning.

src/images/SkImageDecoder_libpng.cpp:
If rewind fails, call png_error.

src/images/SkImageDecoder_libwebp.cpp:
If rewind fails, report an error and return false.

src/images/SkImageRef.cpp:
If rewind fails report an error and return false.
FIXME: Need to handle flattening properly. Should I perhaps move
writeStream into SkOrderedWriteBuffer?

src/images/SkJpegUtility.cpp:
Report a jpeg error on failure to rewind.

BUG=https://b.corp.google.com/issue?id=8432093
R=bungeman@google.com, djsollen@google.com, reed@google.com

Review URL: https://codereview.chromium.org/22861028

git-svn-id: http://skia.googlecode.com/svn/trunk@10977 2bbb7eff-a529-9590-31e7-b0007b416f81
5 files changed