range: add functions for growing and shrinking by one at either end
range: various fixes