Use str.char_offset_iter instead of manually calling str.char_range_at.
auto merge of #1013 : huonw/servo/text-iter, r=pcwalton

And 3 other minor clean-ups: removing a redundant `if`, a redundant function call, and using `slice_from` where it is possible.