muxread,CreateInternal: fix riff size checks
muxread,CreateInternal: fix riff size checks

previously when adjusting size down based on a smaller riff_size the
checks were insufficient to prevent 'size -= RIFF_HEADER_SIZE' from
rolling over causing ChunkVerifyAndAssign to over read. the new checks
are imported from demux.c.

BUG=webp:386

Change-Id: If863c4a9892977b9ade7dd894392a0ecae13775c

PKRoma/libwebp,PKRoma/libwebp,webmproject/libwebp,PKRoma/libwebp,PKRoma/libwebp,PKRoma/libwebp,PKRoma/libwebp,webmproject/libwebp,webmproject/libwebp,webmproject/libwebp,webmproject/libwebp