Implement std.algorithm.cartesianProduct

As discussed in the forum. This implementation supports infinite ranges as long as they satisfy certain range requirements.