ENH: Add --launcher-show-set-environment-commands

Add a new option that is somewhere between the existing 'dump
environment' and 'generate wrapper script' options to write (to stdout)
a series of commands to set up the launch environment. This is intended
to be usable like 'eval $(app --launcher-show-set-environment-commands)'
from a POSIX shell in order to modify the caller's environment.

To support this, refactor generateExecWrapperScript to separate out the
common code, which now writes to a QTextStream, and to write directly to
the output script directly (facilitating use of the new method) rather
than to a QStringList.
BUG: Quote environment variables

Modify generateEnvironmentScript to properly quote environment variables
(introducing a helper method for this purpose) in order to avoid
problems in case a path contains "special" characters (e.g. whitespace,
the escaping character, etc.).
STYLE: Avoid gratuitous stack variables

Now that we are using named string literals for our format strings, give
them static storage, as there is no reason to use stack storage for
them.