Add test for shadow.gen_password

This addresses some breakage in this function. For more info, see
https://github.com/saltstack/salt/pull/12941.