tools: Add util_get_pin helper function

Using this helper PINs can be passed via the command line, stdin and
an environment variable.
For now only used in the openpgp tool.
openpgp-tool: Document options for --pin arguments

Document the behaviour of 'env:<var>' and '-' arguments to --pin
in the --help output of the openpgp-tool.
util: Make util_get_pin behave consistent

*pin is now always set to a usable, freeable char pointer.