change API to accept "parameter set" instead of discrete N/g/hash-alg values

This changes the "params" module to provide parameter-set objects, which are then passed into API functions (usually as the first argument). This should be easier and safer than passing discrete N/g/hash-alg values in.

Closes #15.