An iterator template for iterating all pairwise combinations of a sequence.