Provide a separate function for generating masks.

Due to the way the code is currently implemented, the generate function
can be used to generate passwords based on masks or masks based on
passwords.  However, assuming that all future versions will implicitly
support that is not wise.  Provide a separate function, generate_mask,
that implements that functionality.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>