Add CartesianProduct class.

Add the CartesianProduct class to encapsulate the Cartesian product operation by
implementing an #each iterator.