Make range generic over signed integers

This will allow us to make more efficient use of space in the future. Signed integers allow for generic +ve/-ve offsets.

r? @pcwalton