Handle bad ICO data better.

Cherry-pick from 57ad493789cb1a97574390b5ccf4fb9183ed3814 in Skia:

Interpret size and offset as size_t, as they should be. When read
as int, they could be negative values. If they are negative (rather
than positive and very large), they will not allow us to fail the
length test, resulting in trying to read uninitialized memory.

BUG=b/16010240
R=halcanary@google.com

Author: scroggo@google.com

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

BUG:16010240
Change-Id: I70ff31c1d06ea2705700bb9f5c767a100b946d09
Fix overflow when comparing two ints by promoting the sum to 64-bits.

R=reed@google.com, scroggo@google.com

Author: djsollen@google.com

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

bug: 17265206
Change-Id: Id74fc6d165b55258dbd980d9d36afe1377e7a162
Prevent malformed ICO files from recursively decoding

R=reed@google.com, scroggo@google.com

Author: djsollen@google.com

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

bug:17265466,17262540
Change-Id: I128b54c74d75b7afca20e47e6650c500278c5adc
Merge remote-tracking branch 'upstream/cm-11.0' into cm-11.0_5422