Optimize Range.rest test for returning empty rest

If the `Range` has exactly one element, its `rest` is empty. Previously, the check for this was `size==1`. However, for big, non-`Enumerable` ranges (i. e. there is no mapping from `Element`s to `Integer`s), `size` is expensive because it has to iterate through all the `successor`s (or `predecessor`s). Instead, we now check if `first==last`, which is equivalent but faster.