Remove free-standing div functions in std::uint
Move int and uint overflow tests into macros
Reduce the size of the next_power_of_two tests using loops