genspec.sh: rebase the broken-out patches
When generating the patches under $SINGLE_TARBALL == 0, cherry-pick each commit on top of $MARKER before generating the patch from it. This partly solves the problem of patches generated from old commits not applying on the current tree any more.
To avoid polluting the current working copy, this is done in a temporary worktree inside a temporary directory, which is automatically deleted when the script exits.
NB: With this patch the genspec.sh invocation will create ~1.1 GiB of temporary files in /tmp
when SINGLE_TARBALL is 0. That might be a problem when someone has tmpfs
mounted over it and has little RAM, or has a slow disk. Note that the temporary directory location can be overriden by the user by changing the TMPDIR
environment variable.