Refactor upstream
Rationale: the code has become a tangled mess of global variables and types that hang together when they need not. For example: every HTTP handler uses a 'gitRequest'?? I want to clean this up and see if I can move some things into internal packages.
Apart from using internal packages we now use http.Handler where we can, and fewer global variables.