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: Fix quoting of environment variables

Modify generateEnvironmentScript to properly quote environment variables
(introducing a helper method for this purpose) - specifically, to
correctly escape special characters (e.g. quotes, the escaping
character) rather than just blindly slapping quotes around the string -
in order to avoid problems in case a path contains such characters.
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.
BUG: Make environment commands actually work

Fix subtle bug dumping environment commands; in order for 'eval' to
recognize distinct commands, they must be separated by ';'... just
separating by newlines is not enough.