As the first step, got rid of the big FileCallable blocks

This will allow me to then start merging them together
Moving out the clean part from the if/else branches.

This allows me to then extract this out into a separate extension point

This changes the order of commands for the merge case, which technically makes this change an incompatible change.

I still think this change is OK, because the point of the clean operation is to prevent the left-over from the previous build from affecting the next build. And certainly if the workspace is dirty, the merge operation can fail.
Follow up for remotable GitClient
Split off the submodule related configuration in here.

Code still needs to be split out more, so this is just the beginning
Simplified by taking advantage of remotable GitClient.

Also, simplified the error handling. The original code was trying to continue execution after the first failure, but I don't know if that's worth the code complexity.
looks like this got out of sync
Simplification by using remotable GitClient
unused code
More simplification using the remotable GitClient
looks like these tests got out of sync, too
still more simplification
minor touch up
added another hook in the GitSCMExtension