Instead of checking whether it was set previously, setting it to false,
then setting it back to true if it was true before, just use the
command-line argument in git to override the config for that command.
Using a variable makes it pretty painless to do.
This is not a perfect workaround but it seems to be the best solution
for the moment.
On Windows, this means that when a patch fails to apply, you would now
need to fix that patch, finish the apply (AM), then rebuild all patches,
and then finally re-run the patch apply procedure in order to continue.
This adds a small amount of overhead compared to the traditional method
(which will still work on *nix environments, including WSL). However, it
seems preferable to the build not working on Windows at all.
Disable GPG signing before AM, slows things down and doesn't play nicely.
There is also zero rational or logical reason to do so for these sub-repo AMs.
It's re-enabled (if needed) immediately after, pass or fail.
Given GitHub's recent push for GPG signing, and our own testing, this is not
only helpful, but necessary.