cartesianProduct: default order should be lexicographically sorted.
Update unittest and example code to reflect new ordering.
Get rid of exponential template bloat for most common use case of cartesianProduct.
Merge pull request #2276 from quickfur/cprod_improve1

cartesianProduct improvement