Refactor: extract 'pairs' and 'triples'
Refactor: extract 'pairs' and 'triples'

Make them more general.
Instead of always generating elements, they now take a generator
and use that to return 2-tuples or 3-tuples respectively.

Doing this because both groupProperties and abelianGroupProperties
need these, and duplication sucks.

jml/haskell-spake2