Integrate integer overflow fixes from security branch

cherry-pick of 55625cf05f4345dcab5d9d92b83bb8b5606debab for nyc-dev.

* Throw exception on float cast overflow in dng_stream.cpp.
* Ensure hue is in range before converting to integer.
* Replace the limits from stdint.h by the limit from std::numeric_limits<>.

Bug: 26535130
Change-Id: I660c730a8551a8613655898c0fff749925dad149
3 files changed