Prepare the boot loader for runtime selection of debug output.
PyInstaller debugging configurable using PYI_LOADER_DEBUG env var.
Add support for environment variable PYI_LOADER_REDIRECT.

When set, output from stdout and stderr is sent to a file starting
with the value of the variable and ".PID" appended (where PID is the
process id).

Together with PYI_LOADER_DEBUG=print this allows analyzing why the
PyInstaller generated executable does not start.