Add __len__ and cardinality to cartesian_product_iterator and CartesianProduct

Imported from <a href="http://trac.sagemath.org/sage_trac/ticket/14285">trac #14285</a>.

review patch

Reported by: roed

Component: combinatorics

CC: hivert

Report Upstream: N/A

Authors: David Roe

Dependencies: 

Work issues: 

Reviewers: Julian Rueth

Merged in: sage-5.9.beta1

Attachments: <ol><li><a href="http://trac.sagemath.org/sage_trac/attachment/ticket/14285/14285.patch">14285.patch: </a> by roed at 20130319T10:49:21</li><li><a href="http://trac.sagemath.org/sage_trac/attachment/ticket/14285/trac_14285_review.patch">trac_14285_review.patch: review patch</a> by roed at 20130319T10:50:20</li></ol>