Out-of-profile build support

Many packages rely on the presence of working binaries from other
builds.  This patch supercedes Issue #160 and
fixes https://github.com/hashdist/hashstack2/issues/79,
which prevented the multiline shebang script from correctly resolving an
out-of-profile interpreter.  The shebang script error messages have also
been improved.

Reported-by: Ondrej Certik <ondrej.certik@gmail.com>
Suggested-by: Johannes Ring <johannr@simula.no>
Merge pull request #169 from hashdist/hashdist_in_build

Out-of-profile build support
Export the HDIST_IN_BUILD variable

The variable needs to be exported, so that it propagates into subscripts.
Otherwise it is only defined inside the build scripts, but not when you call
the actual Python script where this variable is checked.

From "man bash":

       When  a  simple command other than a builtin or shell function is to be
       executed, it is invoked in a separate execution environment  that  con‐
       sists  of the following.  Unless otherwise noted, the values are inher‐
       ited from the shell.

       ·      the shell's open files, plus  any  modifications  and  additions
              specified by redirections to the command

       ·      the current working directory

       ·      the file creation mode mask

       ·      shell  variables  and  functions  marked  for export, along with
              variables exported for the command, passed in the environment

The last bullet point explains the issue. As such, the HDIST_IN_BUILD couldn't
have worked before, but it probably isn't tested that often to be noticed.
Fix a test
Merge pull request #174 from hashdist/shebang2

Export the HDIST_IN_BUILD variable
Always keep the build on errors

This is what you typically want, so that you can at leat read the log and see
what went wrong. Only if you really don't want to keep the log even on failure,
you can pass a command line option.
Merge pull request #175 from hashdist/keep

Always keep the build on errors
added logic to skip extraction of a path, if it is simply the common prefix path
Merge pull request #179 from hashdist/zip-fix

added logic to skip extraction of the path if it is simply the common prefix
fixes unnecessary splitlines call
Merge pull request #181 from hashdist/fix_list_split

fixes unnecessary splitlines call
Implicit package parameters (default '')

This allows implicit package-level parameter substitution.

This behavior is inferior to defining explicit parameter defaults,
see comments by @dagss:
https://github.com/hashdist/hashdist/pull/170#issuecomment-31699208
Merge pull request #182 from hashdist/ahmadia/default_package_parameters

Implicit package parameters (default '')