Set GIT_PREVIOUS_COMMIT env var to sha1 of previous built revision in the branch

This can be useful for generating a list of changed files from the previous build. Such a list can be handy for creating incremental builds.