Make shadow support work in FreeBSD, NetBSD

These commits update the user state to support setting a password hash in FreeBSD and NetBSD. It also adds support for specifying a string of text to pass as standard input to commands run via the cmd module.

OpenBSD still needs to be audited, as does MacOS. This is a good step in the right direction, though.