add 'gen' function to 'Key' class

Add the 'gen' function to the 'Key' class, which takes a CPRG and
generation parameters (the type is controlled by a type synonym
family) to return a 'Key' (and a new CPRG).

As a consequence, remove all the separate gen* function.