type_traits: change the way safe_abs_sint is implemented, use a constexpr function instead.

This works around a compiler bug in OSX, and looks nicer too.