Implement static git ssh helper

This implements the proposed solution to #10582 which cleans up the `git` module and fixes issues with /tmp directories mounted with noexec.

To allow for the wrapper to be actually installed #11195 also needs to be merged.