ci-fairy: do not import git from the top

The GitPython module depends in the git command.

Installing git pulls quite some dependencies: eg. in a Debian Buster
system it increases the used space in ~100MB.

We may want to use some of the ci-fairy commands in systems with
constrained space. Since git is used only in some of the commands,
let's import only when it's really needed.

v2:
  - Remove the get_git() helper and patch the git module at
    sys.modules in the tests (Peter).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
16 jobs for tanty/non-mandatory-git in 9 minutes and 29 seconds (queued for 28 seconds)
Child pipeline (parent)
Status Job ID Name Coverage
  Debian Container Build
passed #5718649
debian:buster@container-build@x86_64

00:00:51

passed #5718625
debian@cache-container-build@x86_64

00:00:52

passed #5718642
debian:sid@container-build@x86_64

00:00:49

passed #5718628
aarch64
debian:stretch@container-build@aarch64

00:01:03

passed #5718621
debian:stretch@container-build@x86_64

00:00:51

passed #5718634
kvm
debian:stretch@qemu-build@x86_64

00:07:58

 
  Debian Check
passed #5718672
check labels debian@x86_64:stretch

00:00:13

passed #5718679
debian:buster@check@x86_64

00:00:12

passed #5718659
debian@cache-check@x86_64

00:00:12

passed #5718676
debian:sid@check@x86_64

00:00:14

passed #5718657
debian:stretch@base-image@x86_64

00:00:49

passed #5718662
aarch64
debian:stretch@check@aarch64

00:00:21

passed #5718653
debian:stretch@check@x86_64

00:00:12

passed #5718666
kvm
debian:stretch@qemu-check@x86_64

00:01:29

passed #5718669
do not rebuild debian:stretch@container-build@x86_64

00:00:15

passed #5718673
pull upstream debian:stretch@container-build@x86_64

00:00:20