libcore: Add range_step and range_rev functions.

Closes #1817
libcore: Correct behaviour of range_step for uint, tests for range* functions.

Splits the range_step function into the two directions (up, low -> high,
and down, high -> low) for the uint types, since there is no way to have
`step < 0` for a backwards range.
Add a T_SIGNED type to uint template and eliminate step_down variant

Handle negative steps properly in range_step, fix order of arguments
in tests, and such.