Simplify util::range::RangeIndex to always require std::num::Int,

and fix remaining warnings.