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>
15 jobs for tanty/non-mandatory-git in 15 minutes and 7 seconds (queued for 27 seconds)
Child pipeline (parent)
Status Job ID Name Coverage
  Ubuntu Container Build
passed #5718656
ubuntu:18.04@container-build@x86_64

00:00:50

passed #5718646
aarch64
ubuntu:19.10@container-build@aarch64

00:01:12

passed #5718637
ubuntu:19.10@container-build@x86_64

00:00:54

passed #5721653
kvm
ubuntu:19.10@qemu-build@x86_64

00:11:00

passed #5718641
ubuntu@cache-container-build@x86_64

00:01:24

failed #5718651
kvm
ubuntu:19.10@qemu-build@x86_64

00:01:24

 
  Ubuntu Check
passed #5718678
check labels ubuntu@x86_64:19.10

00:00:12

passed #5718675
do not rebuild ubuntu:19.10@container-build@x86_64

00:00:19

passed #5718681
pull upstream ubuntu:19.10@container-build@x86_64

00:00:33

passed #5718683
ubuntu:18.04@check@x86_64

00:00:12

passed #5718663
ubuntu:19.10@base-image@x86_64

00:00:45

passed #5718668
aarch64
ubuntu:19.10@check@aarch64

00:00:43

passed #5718660
ubuntu:19.10@check@x86_64

00:00:16

passed #5718671
kvm
ubuntu:19.10@qemu-check@x86_64

00:02:04

passed #5718665
ubuntu@cache-check@x86_64

00:00:14