Add numeric_cast for checked integral narrowing casts

In work on bringing up Windows x64, there are many places that need
to be safely narrowed to the types used for interacting with other
APIs (particularly when using containers). Rather than scatter these
CHECKs all over, numeric_cast<> CHECKs that the runtime value can be
safely converted to the target type.

BUG=8606, 167187, 166496

Review URL:

git-svn-id: svn:// 0039d316-1c4b-4281-b951-d872f2087c98
5 files changed