Updated Tensor::range(size_t d) to work with latest Range interface.