Handle Git submodules correctly

Due to the way submodules are organized in the latest versions of Git,
the working directory in the submodule repository configuration is set
to the relative path of submodule with respect to its physical GIT_DIR
location, instead of default ".". This confuses git-update-index, and
causes `pristine-tar commit' to fail.
Set GIT_WORK_TREE when committing to make it work when inside a git submodule. Thanks, Victor Vasiliev. Closes: #726007
remove unnecessary unset

TAR_LONGLINK_100 is set and then unset inside a single function.
This unset appears to be unnecessary cruft.
Work around change in longlink fields in tar 1.27. (Needs PRISTINE_TAR_COMPAT patch applied to tar.) Closes: #726963