add core.checkedint

There's been a lot of interest, both in D and other languages, in detecting integer arithmetic overflows. Because of performance and other issues, it is unlikely such checking will be added to the core D integral types.

This adds primitives which can be used to do checked integral operations, i.e. operations that check for overflow.

A checked integer type would be a Phobos library type that builds on these primitives.
I thought this simply means the caller keeps a single overflow bit as a
local variable, then perform a whole bunch of operations in one go, and
then check the overflow bit at the end, rather than checking the
overflow bit for every operation. The ref is so that each operation can
write to that bit when an overflow occurs, but it doesn't really care
what the current value of the overflow bit is.