Use move and stack allocation for RangeSpanLists. As a result make
a few things more const as well because we're now using const
references to refer to iterators.