Implement range syntax

Closes #19794

r? @aturon for the first patch
r? @nikomatsakis for the rest
Now that I think about it, does it even make sense for this to implement `Iterator`?